diff --git a/internal/consensus/state_test.go b/internal/consensus/state_test.go index 200d792c4..d82718b77 100644 --- a/internal/consensus/state_test.go +++ b/internal/consensus/state_test.go @@ -2483,7 +2483,7 @@ func TestWaitingTimeoutProposeOnNewRound(t *testing.T) { round++ // moving to the next round ensureNewRound(t, newRoundCh, height, round) rs := cs1.GetRoundState() - assert.Equal(t, rs.Step, cstypes.RoundStepPropose) // P0 does not prevote before timeoutPropose expires + assert.Equal(t, true, rs.Step == cstypes.RoundStepPropose || rs.Step == cstypes.RoundStepNewRound) ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.proposeTimeout(round).Milliseconds()) diff --git a/rpc/jsonrpc/server/http_server.go b/rpc/jsonrpc/server/http_server.go index 1a3dd4449..67808e59d 100644 --- a/rpc/jsonrpc/server/http_server.go +++ b/rpc/jsonrpc/server/http_server.go @@ -146,8 +146,9 @@ func writeHTTPResponse(w http.ResponseWriter, log log.Logger, rsp rpctypes.RPCRe return } statusCode := http.StatusOK - // If there's any error for lag is high, override the status code + // If there's any error for lag is high, override the status code and response body if rsp.Error != nil && rsp.Error.Code == int(rpctypes.CodeLagIsHighError) { + body = rsp.Result statusCode = http.StatusExpectationFailed } w.Header().Set("Content-Type", "application/json")