mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 19:00:46 +00:00
eth/protocols/snap: set abort when storage range hits limit hash
When the storage iterator reaches the requested limit hash, mark the response as aborted so endpoint Merkle proofs are included for capped replies.
This commit is contained in:
parent
e3b6d0c86f
commit
7157de6b4f
1 changed files with 1 additions and 0 deletions
|
|
@ -242,6 +242,7 @@ func ServiceGetStorageRangesQuery(chain *core.BlockChain, req *GetStorageRangesP
|
||||||
})
|
})
|
||||||
// If we've exceeded the request threshold, abort
|
// If we've exceeded the request threshold, abort
|
||||||
if bytes.Compare(hash[:], limit[:]) >= 0 {
|
if bytes.Compare(hash[:], limit[:]) >= 0 {
|
||||||
|
abort = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue