From 8c02f2c2e6bac3bf6ce50da8474abe577e0577a9 Mon Sep 17 00:00:00 2001 From: Anca Zamfir Date: Sat, 18 Dec 2021 03:01:26 +0100 Subject: [PATCH] William's suggestion to get the proposal from the proposer instead of generating it. --- internal/consensus/pbts_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/consensus/pbts_test.go b/internal/consensus/pbts_test.go index 0f1e97cf1..e630db989 100644 --- a/internal/consensus/pbts_test.go +++ b/internal/consensus/pbts_test.go @@ -147,11 +147,12 @@ func (p *pbtsTestHarness) observedValidatorProposerHeight(previousBlockTime time p.validatorClock.On("Now").Return(p.height2ProposedBlockTime).Times(6) ensureNewRound(p.t, p.roundCh, p.currentHeight, p.currentRound) - propBlock, partSet := p.observedState.createProposalBlock() - bid := types.BlockID{Hash: propBlock.Hash(), PartSetHeader: partSet.Header()} timeout := time.Until(previousBlockTime.Add(ensureTimeout)) - ensureProposalWithTimeout(p.t, p.ensureProposalCh, p.currentHeight, p.currentRound, bid, timeout) + ensureProposalWithTimeout(p.t, p.ensureProposalCh, p.currentHeight, p.currentRound, types.BlockID{}, timeout) + + rs := p.observedState.GetRoundState() + bid := types.BlockID{Hash: rs.ProposalBlock.Hash(), PartSetHeader: rs.ProposalBlockParts.Header()} ensurePrevote(p.t, p.ensureVoteCh, p.currentHeight, p.currentRound) signAddVotes(p.ctx, p.observedState, tmproto.PrevoteType, p.chainID, bid, p.otherValidators...)