|
|
@ -524,9 +524,7 @@ func TestLockPOLRelock(t *testing.T) { |
|
|
|
|
|
|
|
signAddVotes(cs1, types.VoteTypePrevote, cs1.ProposalBlock.Hash(), cs1.ProposalBlockParts.Header(), vs2, vs3, vs4) |
|
|
|
// prevotes
|
|
|
|
<-voteCh |
|
|
|
<-voteCh |
|
|
|
<-voteCh |
|
|
|
discardFromChan(voteCh, 3) |
|
|
|
|
|
|
|
<-voteCh // our precommit
|
|
|
|
// the proposed block should now be locked and our precommit added
|
|
|
@ -536,9 +534,7 @@ func TestLockPOLRelock(t *testing.T) { |
|
|
|
signAddVotes(cs1, types.VoteTypePrecommit, nil, types.PartSetHeader{}, vs2, vs4) |
|
|
|
signAddVotes(cs1, types.VoteTypePrecommit, cs1.ProposalBlock.Hash(), cs1.ProposalBlockParts.Header(), vs3) |
|
|
|
// precommites
|
|
|
|
<-voteCh |
|
|
|
<-voteCh |
|
|
|
<-voteCh |
|
|
|
discardFromChan(voteCh, 3) |
|
|
|
|
|
|
|
// before we timeout to the new round set the new proposal
|
|
|
|
prop, propBlock := decideProposal(cs1, vs2, vs2.Height, vs2.Round+1) |
|
|
@ -577,9 +573,7 @@ func TestLockPOLRelock(t *testing.T) { |
|
|
|
// now lets add prevotes from everyone else for the new block
|
|
|
|
signAddVotes(cs1, types.VoteTypePrevote, propBlockHash, propBlockParts.Header(), vs2, vs3, vs4) |
|
|
|
// prevotes
|
|
|
|
<-voteCh |
|
|
|
<-voteCh |
|
|
|
<-voteCh |
|
|
|
discardFromChan(voteCh, 3) |
|
|
|
|
|
|
|
// now either we go to PrevoteWait or Precommit
|
|
|
|
select { |
|
|
@ -594,8 +588,7 @@ func TestLockPOLRelock(t *testing.T) { |
|
|
|
validatePrecommit(t, cs1, 1, 1, vss[0], propBlockHash, propBlockHash) |
|
|
|
|
|
|
|
signAddVotes(cs1, types.VoteTypePrecommit, propBlockHash, propBlockParts.Header(), vs2, vs3) |
|
|
|
<-voteCh |
|
|
|
<-voteCh |
|
|
|
discardFromChan(voteCh, 2) |
|
|
|
|
|
|
|
be := <-newBlockCh |
|
|
|
b := be.(types.TMEventData).Unwrap().(types.EventDataNewBlockHeader) |
|
|
|