mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 20:56:42 +00:00
eth/tracers: fix nil pointer dereference in TraceCall with BlockOverrides
This commit is contained in:
parent
0413af40f6
commit
6fe7d9de55
1 changed files with 1 additions and 1 deletions
|
|
@ -959,7 +959,7 @@ func (api *API) TraceCall(ctx context.Context, args ethapi.TransactionArgs, bloc
|
|||
|
||||
// Apply the customization rules if required.
|
||||
if config != nil {
|
||||
if config.BlockOverrides != nil && config.BlockOverrides.Number.ToInt().Uint64() == h.Number.Uint64()+1 {
|
||||
if config.BlockOverrides != nil && config.BlockOverrides.Number != nil && config.BlockOverrides.Number.ToInt().Uint64() == h.Number.Uint64()+1 {
|
||||
// Overriding the block number to n+1 is a common way for wallets to
|
||||
// simulate transactions, however without the following fix, a contract
|
||||
// can assert it is being simulated by checking if blockhash(n) == 0x0 and
|
||||
|
|
|
|||
Loading…
Reference in a new issue