consensus: avert a data race in round state access (#8112)

This commit is contained in:
M. J. Fromberger
2022-03-11 11:16:19 -08:00
committed by GitHub
parent 76ed7d7954
commit 9b87606dee

View File

@@ -271,7 +271,7 @@ func signAddVotes(
}
func validatePrevote(t *testing.T, cs *State, round int32, privVal *validatorStub, blockHash []byte) {
prevotes := cs.Votes.Prevotes(round)
prevotes := cs.GetRoundState().Votes.Prevotes(round)
pubKey, err := privVal.GetPubKey(context.Background())
require.NoError(t, err)
address := pubKey.Address()