Skip to content

Commit

Permalink
Ignore insufficient funds errors on tracing
Browse files Browse the repository at this point in the history
  • Loading branch information
jewei1997 committed Jun 12, 2024
1 parent 2ae2853 commit 3afc01c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions eth/tracers/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -990,6 +990,9 @@ func (api *API) traceTx(ctx context.Context, tx *types.Transaction, message *cor
statedb.SetTxContext(txctx.TxHash, txctx.TxIndex)
_, err = core.ApplyTransactionWithEVM(message, api.backend.ChainConfig(), new(core.GasPool).AddGas(message.GasLimit), statedb, vmctx.BlockNumber, txctx.BlockHash, tx, &usedGas, vmenv)
if err != nil {
if err == core.ErrInsufficientFunds {
return []byte("{}"), nil
}
return nil, fmt.Errorf("tracing failed: %w", err)
}
return tracer.GetResult()
Expand Down

0 comments on commit 3afc01c

Please sign in to comment.