未验证 提交 bddd103a 编写于 作者: F Felföldi Zsolt 提交者: GitHub

les: fix GetProofsV2 bug (#21896)

上级 6b584096
......@@ -610,6 +610,7 @@ func (h *serverHandler) handleMsg(p *clientPeer, wg *sync.WaitGroup) error {
var (
lastBHash common.Hash
root common.Hash
header *types.Header
)
reqCnt := len(req.Reqs)
if accept(req.ReqID, uint64(reqCnt), MaxProofsFetch) {
......@@ -624,10 +625,6 @@ func (h *serverHandler) handleMsg(p *clientPeer, wg *sync.WaitGroup) error {
return
}
// Look up the root hash belonging to the request
var (
header *types.Header
trie state.Trie
)
if request.BHash != lastBHash {
root, lastBHash = common.Hash{}, request.BHash
......@@ -654,6 +651,7 @@ func (h *serverHandler) handleMsg(p *clientPeer, wg *sync.WaitGroup) error {
// Open the account or storage trie for the request
statedb := h.blockchain.StateCache()
var trie state.Trie
switch len(request.AccKey) {
case 0:
// No account key specified, open an account trie
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册