Skip to content

Commit

Permalink
cleanup TxExecutor api
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang committed Mar 8, 2024
1 parent f86daa0 commit f7440a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion baseapp/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,9 @@ func (app *BaseApp) internalFinalizeBlock(ctx context.Context, req *abci.Request

func (app *BaseApp) executeTxs(ctx context.Context, txs [][]byte) ([]*abci.ExecTxResult, error) {
if app.txExecutor != nil {
return app.txExecutor(ctx, txs, app.finalizeBlockState.ms, app.deliverTxWithMultiStore)
return app.txExecutor(ctx, len(txs), app.finalizeBlockState.ms, func(i int, ms storetypes.MultiStore) *abci.ExecTxResult {
return app.deliverTxWithMultiStore(txs[i], i, ms)
})
}

txResults := make([]*abci.ExecTxResult, 0, len(txs))
Expand Down
4 changes: 2 additions & 2 deletions baseapp/txexecutor.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

type TxExecutor func(
ctx context.Context,
txs [][]byte,
blockSize int,
cms storetypes.MultiStore,
deliverTxWithMultiStore func([]byte, int, storetypes.MultiStore) *abci.ExecTxResult,
deliverTxWithMultiStore func(int, storetypes.MultiStore) *abci.ExecTxResult,
) ([]*abci.ExecTxResult, error)

0 comments on commit f7440a5

Please sign in to comment.