From fc9987dfc64d4da8d2c29d999caee3c3b352c561 Mon Sep 17 00:00:00 2001 From: w0xlt <94266259+w0xlt@users.noreply.github.com> Date: Wed, 1 Apr 2026 11:21:44 -0700 Subject: [PATCH] doc: remove stale shortid collision TODO PartiallyDownloadedBlock::InitData() intentionally treats duplicate short IDs in a compact block as READ_STATUS_FAILED. For an honest peer, block-level short-ID collisions are rare enough that failing the compact block early is preferable to spending CPU scanning the mempool or attempting selective recovery. Remove the old TODO that suggested requesting both collided transactions, since it since it points at unwanted behavior. --- src/blockencodings.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/blockencodings.cpp b/src/blockencodings.cpp index fd528309902..18799cd8083 100644 --- a/src/blockencodings.cpp +++ b/src/blockencodings.cpp @@ -110,8 +110,6 @@ ReadStatus PartiallyDownloadedBlock::InitData(const CBlockHeaderAndShortTxIDs& c if (shorttxids.bucket_size(shorttxids.bucket(cmpctblock.shorttxids[i])) > 12) return READ_STATUS_FAILED; } - // TODO: in the shortid-collision case, we should instead request both transactions - // which collided. Falling back to full-block-request here is overkill. if (shorttxids.size() != cmpctblock.shorttxids.size()) return READ_STATUS_FAILED; // Short ID collision