diff --git a/internal/consensus/byzantine_test.go b/internal/consensus/byzantine_test.go index 20143b1f4..055eef770 100644 --- a/internal/consensus/byzantine_test.go +++ b/internal/consensus/byzantine_test.go @@ -203,8 +203,7 @@ func TestByzantinePrevoteEquivocation(t *testing.T) { proposerAddr := lazyNodeState.privValidatorPubKey.Address() block, err := lazyNodeState.blockExec.CreateProposalBlock( - ctx, lazyNodeState.Height, lazyNodeState.state, commit, proposerAddr, votes, - ) + ctx, lazyNodeState.Height, lazyNodeState.state, commit, proposerAddr) require.NoError(t, err) blockParts, err := block.MakePartSet(types.BlockPartSizeBytes) require.NoError(t, err) diff --git a/internal/consensus/state.go b/internal/consensus/state.go index 9f5778287..3e1f9511d 100644 --- a/internal/consensus/state.go +++ b/internal/consensus/state.go @@ -1363,7 +1363,6 @@ func (cs *State) createProposalBlock(ctx context.Context) (block *types.Block, e } var commit *types.Commit - var votes []*types.Vote switch { case cs.Height == cs.state.InitialHeight: // We're creating a proposal for the first block. @@ -1373,7 +1372,6 @@ func (cs *State) createProposalBlock(ctx context.Context) (block *types.Block, e case cs.LastCommit.HasTwoThirdsMajority(): // Make the commit from LastCommit commit = cs.LastCommit.MakeCommit() - votes = cs.LastCommit.GetVotes() default: // This shouldn't happen. cs.logger.Error("propose step; cannot propose anything without commit for the previous block") @@ -1389,7 +1387,7 @@ func (cs *State) createProposalBlock(ctx context.Context) (block *types.Block, e proposerAddr := cs.privValidatorPubKey.Address() - return cs.blockExec.CreateProposalBlock(ctx, cs.Height, cs.state, commit, proposerAddr, votes) + return cs.blockExec.CreateProposalBlock(ctx, cs.Height, cs.state, commit, proposerAddr) } // Enter: `timeoutPropose` after entering Propose. diff --git a/internal/state/execution.go b/internal/state/execution.go index ce18f7ed0..c913b48a4 100644 --- a/internal/state/execution.go +++ b/internal/state/execution.go @@ -102,7 +102,6 @@ func (blockExec *BlockExecutor) CreateProposalBlock( state State, commit *types.Commit, proposerAddr []byte, - votes []*types.Vote, ) (*types.Block, error) { maxBytes := state.ConsensusParams.Block.MaxBytes diff --git a/internal/state/execution_test.go b/internal/state/execution_test.go index 282c5f10d..2443e17f5 100644 --- a/internal/state/execution_test.go +++ b/internal/state/execution_test.go @@ -653,7 +653,7 @@ func TestEmptyPrepareProposal(t *testing.T) { ) pa, _ := state.Validators.GetByIndex(0) commit := makeValidCommit(ctx, t, height, types.BlockID{}, state.Validators, privVals) - _, err = blockExec.CreateProposalBlock(ctx, height, state, commit, pa, nil) + _, err = blockExec.CreateProposalBlock(ctx, height, state, commit, pa) require.NoError(t, err) } diff --git a/node/node_test.go b/node/node_test.go index eeeb01008..698e8d70a 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -341,7 +341,6 @@ func TestCreateProposalBlock(t *testing.T) { height, state, commit, proposerAddr, - nil, ) require.NoError(t, err) @@ -420,7 +419,6 @@ func TestMaxTxsProposalBlockSize(t *testing.T) { height, state, commit, proposerAddr, - nil, ) require.NoError(t, err) @@ -535,7 +533,6 @@ func TestMaxProposalBlockSize(t *testing.T) { math.MaxInt64, state, commit, proposerAddr, - nil, ) require.NoError(t, err) partSet, err := block.MakePartSet(types.BlockPartSizeBytes)