From 7157de6b4f009b4e1e3597d089e1c1dc814f6bb4 Mon Sep 17 00:00:00 2001 From: Weixie Cui Date: Sat, 4 Jul 2026 23:54:18 +0800 Subject: [PATCH] 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. --- eth/protocols/snap/handlers.go | 1 + 1 file changed, 1 insertion(+) diff --git a/eth/protocols/snap/handlers.go b/eth/protocols/snap/handlers.go index 106322de90..db4f5f033a 100644 --- a/eth/protocols/snap/handlers.go +++ b/eth/protocols/snap/handlers.go @@ -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 } }