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:
Weixie Cui 2026-07-04 23:54:18 +08:00
parent e3b6d0c86f
commit 7157de6b4f

View file

@ -242,6 +242,7 @@ func ServiceGetStorageRangesQuery(chain *core.BlockChain, req *GetStorageRangesP
})
// If we've exceeded the request threshold, abort
if bytes.Compare(hash[:], limit[:]) >= 0 {
abort = true
break
}
}