mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
fix: include start key
Update api_debug.go
This commit is contained in:
parent
24771fdba4
commit
f64d701014
1 changed files with 4 additions and 1 deletions
|
|
@ -245,7 +245,7 @@ func storageRangeAt(statedb *state.StateDB, root common.Hash, address common.Add
|
|||
}
|
||||
it := trie.NewIterator(trieIt)
|
||||
result := StorageRangeResult{Storage: storageMap{}}
|
||||
for i := 0; i < maxResult && it.Next(); i++ {
|
||||
for range maxResult {
|
||||
_, content, _, err := rlp.Split(it.Value)
|
||||
if err != nil {
|
||||
return StorageRangeResult{}, err
|
||||
|
|
@ -256,6 +256,9 @@ func storageRangeAt(statedb *state.StateDB, root common.Hash, address common.Add
|
|||
e.Key = &preimage
|
||||
}
|
||||
result.Storage[common.BytesToHash(it.Key)] = e
|
||||
if !it.Next() {
|
||||
break
|
||||
}
|
||||
}
|
||||
// Add the 'next key' so clients can continue downloading.
|
||||
if it.Next() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue