diff --git a/node/block_processor/processor.go b/node/block_processor/processor.go index a54180e27..4a55e5672 100644 --- a/node/block_processor/processor.go +++ b/node/block_processor/processor.go @@ -73,6 +73,7 @@ func NewBlockProcessor(ctx context.Context, db DB, txapp TxApp, accounts Account validators: vs, snapshotter: sp, signer: signer, + events: es, log: logger, } diff --git a/node/block_processor/transactions.go b/node/block_processor/transactions.go index 7fad77497..80a03eabe 100644 --- a/node/block_processor/transactions.go +++ b/node/block_processor/transactions.go @@ -254,7 +254,7 @@ func (bp *BlockProcessor) prepareValidatorVoteBodyTx(ctx context.Context, nonce eventMap[*evt.ID()] = evt } - emptyTxSz, err := bp.emptyVodeBodyTxSize() + emptyTxSz, err := bp.emptyVoteBodyTxSize() if err != nil { return nil, err } @@ -322,7 +322,7 @@ func (bp *BlockProcessor) prepareValidatorVoteBodyTx(ctx context.Context, nonce // emptyVodeBodyTxSize returns the size of an empty validator vote body transaction. // used to estimate the size of the validator vote body transactions with events as the // size is directly proportional to the events size. -func (bp *BlockProcessor) emptyVodeBodyTxSize() (int64, error) { +func (bp *BlockProcessor) emptyVoteBodyTxSize() (int64, error) { payload := &types.ValidatorVoteBodies{ Events: []*types.VotableEvent{}, } diff --git a/node/block_processor/transactions_test.go b/node/block_processor/transactions_test.go index 68be4b5f3..baf3e025a 100644 --- a/node/block_processor/transactions_test.go +++ b/node/block_processor/transactions_test.go @@ -534,7 +534,7 @@ func TestPrepareVoteBodyTx(t *testing.T) { events: []*types.VotableEvent{evt1, evt2, evt3}, fn: func(ctx context.Context, bp *BlockProcessor, es *mockEventStore) error { - emptyTxSize, err := bp.emptyVodeBodyTxSize() + emptyTxSize, err := bp.emptyVoteBodyTxSize() require.NoError(t, err) // support evt1