mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
rpc: return a Next hash even without a preimage
This commit is contained in:
parent
795cfed5c0
commit
99e7ebe37c
1 changed files with 1 additions and 6 deletions
|
|
@ -19,7 +19,6 @@ package eth
|
||||||
import (
|
import (
|
||||||
"compress/gzip"
|
"compress/gzip"
|
||||||
"context"
|
"context"
|
||||||
"encoding/hex"
|
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
@ -363,11 +362,7 @@ func accountRange(st state.Trie, start *common.Hash, maxResults int) (AccountRan
|
||||||
}
|
}
|
||||||
|
|
||||||
if it.Next() {
|
if it.Next() {
|
||||||
if preimage := st.GetKey(it.Key); preimage != nil {
|
|
||||||
result.Next = common.BytesToHash(it.Key)
|
result.Next = common.BytesToHash(it.Key)
|
||||||
} else {
|
|
||||||
return AccountRangeResult{}, fmt.Errorf("preimage not found for 0x%s", hex.EncodeToString(it.Key))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result, nil
|
return result, nil
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue