mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-14 13:51:21 +00:00
Delay validator set changes by 1 block.
This commit is contained in:
@ -64,22 +64,22 @@ func TestStateProposerSelection0(t *testing.T) {
|
||||
|
||||
startTestRound(cs1, height, round)
|
||||
|
||||
// wait for new round so proposer is set
|
||||
// Wait for new round so proposer is set.
|
||||
<-newRoundCh
|
||||
|
||||
// lets commit a block and ensure proposer for the next height is correct
|
||||
// Commit a block and ensure proposer for the next height is correct.
|
||||
prop := cs1.GetRoundState().Validators.GetProposer()
|
||||
if !bytes.Equal(prop.Address, cs1.privValidator.GetAddress()) {
|
||||
t.Fatalf("expected proposer to be validator %d. Got %X", 0, prop.Address)
|
||||
}
|
||||
|
||||
// wait for complete proposal
|
||||
// Wait for complete proposal.
|
||||
<-proposalCh
|
||||
|
||||
rs := cs1.GetRoundState()
|
||||
signAddVotes(cs1, types.VoteTypePrecommit, rs.ProposalBlock.Hash(), rs.ProposalBlockParts.Header(), vss[1:]...)
|
||||
|
||||
// wait for new round so next validator is set
|
||||
// Wait for new round so next validator is set.
|
||||
<-newRoundCh
|
||||
|
||||
prop = cs1.GetRoundState().Validators.GetProposer()
|
||||
|
Reference in New Issue
Block a user