mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
fix for storageRangeAt when block has 0 tx's
This commit is contained in:
parent
a9c74bb59a
commit
d1469f7a38
1 changed files with 4 additions and 0 deletions
|
|
@ -649,6 +649,10 @@ func (api *PrivateDebugAPI) computeTxEnv(blockHash common.Hash, txIndex int, ree
|
|||
// Recompute transactions up to the target index.
|
||||
signer := types.MakeSigner(api.config, block.Number())
|
||||
|
||||
if len(block.Transactions()) == 0 {
|
||||
return nil, vm.Context{}, statedb, nil
|
||||
}
|
||||
|
||||
for idx, tx := range block.Transactions() {
|
||||
// Assemble the transaction call message and return if the requested offset
|
||||
msg, _ := tx.AsMessage(signer)
|
||||
|
|
|
|||
Loading…
Reference in a new issue