From 99e7ebe37c848cbd5d60638dc14ba4359e64a95e Mon Sep 17 00:00:00 2001 From: Guillaume Ballet Date: Wed, 10 Jul 2019 12:23:50 +0200 Subject: [PATCH] rpc: return a Next hash even without a preimage --- eth/api.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/eth/api.go b/eth/api.go index f5bd11aeed..caa31b9fa5 100644 --- a/eth/api.go +++ b/eth/api.go @@ -19,7 +19,6 @@ package eth import ( "compress/gzip" "context" - "encoding/hex" "errors" "fmt" "io" @@ -363,11 +362,7 @@ func accountRange(st state.Trie, start *common.Hash, maxResults int) (AccountRan } if it.Next() { - if preimage := st.GetKey(it.Key); preimage != nil { - result.Next = common.BytesToHash(it.Key) - } else { - return AccountRangeResult{}, fmt.Errorf("preimage not found for 0x%s", hex.EncodeToString(it.Key)) - } + result.Next = common.BytesToHash(it.Key) } return result, nil