mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
revert if prev traced tx failed
This commit is contained in:
parent
520314db05
commit
f6bb4f8101
1 changed files with 1 additions and 0 deletions
|
|
@ -643,6 +643,7 @@ func (api *API) traceBlock(ctx context.Context, block *types.Block, metadata []t
|
|||
res, err := api.traceTx(ctx, tx, msg, txctx, blockCtx, statedb, config)
|
||||
if err != nil {
|
||||
results[i] = &TxTraceResult{TxHash: tx.Hash(), Error: err.Error()}
|
||||
statedb.RevertToSnapshot(0)
|
||||
} else {
|
||||
results[i] = &TxTraceResult{TxHash: tx.Hash(), Result: res}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue