Skip to content

Commit 49a7ee4

Browse files
cdetriofjl
authored andcommitted
eth: fix storageRangeAt for empty blocks (#18076)
1 parent 2521509 commit 49a7ee4

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎eth/api_tracer.go‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,11 @@ func (api *PrivateDebugAPI) computeTxEnv(blockHash common.Hash, txIndex int, ree
795795
if err != nil {
796796
return nil, vm.Context{}, nil, err
797797
}
798+
799+
if txIndex == 0 && len(block.Transactions()) == 0 {
800+
return nil, vm.Context{}, statedb, nil
801+
}
802+
798803
// Recompute transactions up to the target index.
799804
signer := types.MakeSigner(api.eth.blockchain.Config(), block.Number())
800805

0 commit comments

Comments
 (0)