Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang committed Sep 11, 2024
1 parent f57522d commit 2e8005c
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions baseapp/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ func (app *BaseApp) executeTxs(ctx context.Context, txs [][]byte) ([]*abci.ExecT

if app.txExecutor != nil {
validTxResults, err := app.txExecutor(ctx, memTxs, app.finalizeBlockState.ms, func(i int, ms storetypes.MultiStore, incarnationCache map[string]any) *abci.ExecTxResult {
return app.deliverTxWithMultiStore(txs[i], memTxs[i], i, ms, incarnationCache)
return app.deliverTxWithMultiStore(txs[validTxs[i]], memTxs[i], i, ms, incarnationCache)
})
if err != nil {
return nil, err
Expand All @@ -874,18 +874,18 @@ func (app *BaseApp) executeTxs(ctx context.Context, txs [][]byte) ([]*abci.ExecT
for i, res := range validTxResults {
txResults[validTxs[i]] = res
}
}

for i := range memTxs {
txIndex := validTxs[i]
txResults[txIndex] = app.deliverTx(txs[txIndex], i)

// check after every tx if we should abort
select {
case <-ctx.Done():
return nil, ctx.Err()
default:
// continue
} else {
for i := range memTxs {
txIndex := validTxs[i]
txResults[txIndex] = app.deliverTx(txs[txIndex], i)

// check after every tx if we should abort
select {
case <-ctx.Done():
return nil, ctx.Err()
default:
// continue
}
}
}
return txResults, nil
Expand Down

0 comments on commit 2e8005c

Please sign in to comment.