eth: fix storageRangeAt for empty blocks

This commit is contained in:
cdetrio 2018-11-10 18:45:15 -05:00
parent 6269e5574c
commit 1468ec6224

View file

@ -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())