Browse Source

Fix data race.

Original repro:
  go test -run TestStateFullRound1 -race -count=500 ./internal/consensus
pull/8105/head
M. J. Fromberger 3 years ago
parent
commit
337ee974a0
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      internal/consensus/common_test.go

+ 1
- 1
internal/consensus/common_test.go View File

@ -291,7 +291,7 @@ func validatePrevote(t *testing.T, cs *State, round int32, privVal *validatorStu
} }
func validateLastPrecommit(t *testing.T, cs *State, privVal *validatorStub, blockHash []byte) { func validateLastPrecommit(t *testing.T, cs *State, privVal *validatorStub, blockHash []byte) {
votes := cs.LastCommit
votes := cs.GetRoundState().LastCommit
pv, err := privVal.GetPubKey(context.Background()) pv, err := privVal.GetPubKey(context.Background())
require.NoError(t, err) require.NoError(t, err)
address := pv.Address() address := pv.Address()


Loading…
Cancel
Save