Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions eth/api_debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,13 @@ func storageRangeAt(statedb *state.StateDB, root common.Hash, address common.Add
next := common.BytesToHash(it.Key)
result.NextKey = &next
}
// Iterator.Next returns false on both exhaustion and error, so a failure to
// resolve a trie node mid-range would otherwise be reported as a complete
// result (a nil NextKey claims all keys were returned). Surface the error
// instead of silently truncating.
if it.Err != nil {
return StorageRangeResult{}, it.Err
}
return result, nil
}

Expand Down
Loading