aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorcdetrio <cdetrio@gmail.com>2019-07-12 23:43:07 +0800
committerFelix Lange <fjl@twurst.com>2019-07-12 23:43:07 +0800
commit49a7ee460e839499ef41f5110b219ec8c8edc5e8 (patch)
tree6c75bd013438108cdae28ef0c7a21077d848a586 /eth
parent252150918c50a1428eb4ceec714f5de40247d8ce (diff)
downloadgo-tangerine-49a7ee460e839499ef41f5110b219ec8c8edc5e8.tar
go-tangerine-49a7ee460e839499ef41f5110b219ec8c8edc5e8.tar.gz
go-tangerine-49a7ee460e839499ef41f5110b219ec8c8edc5e8.tar.bz2
go-tangerine-49a7ee460e839499ef41f5110b219ec8c8edc5e8.tar.lz
go-tangerine-49a7ee460e839499ef41f5110b219ec8c8edc5e8.tar.xz
go-tangerine-49a7ee460e839499ef41f5110b219ec8c8edc5e8.tar.zst
go-tangerine-49a7ee460e839499ef41f5110b219ec8c8edc5e8.zip
eth: fix storageRangeAt for empty blocks (#18076)
Diffstat (limited to 'eth')
-rw-r--r--eth/api_tracer.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/eth/api_tracer.go b/eth/api_tracer.go
index 2800ff659..ce211cbd9 100644
--- a/eth/api_tracer.go
+++ b/eth/api_tracer.go
@@ -795,6 +795,11 @@ func (api *PrivateDebugAPI) computeTxEnv(blockHash common.Hash, txIndex int, ree
if err != nil {
return nil, vm.Context{}, nil, err
}
+
+ if txIndex == 0 && len(block.Transactions()) == 0 {
+ return nil, vm.Context{}, statedb, nil
+ }
+
// Recompute transactions up to the target index.
signer := types.MakeSigner(api.eth.blockchain.Config(), block.Number())