mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-06 21:57:54 +02:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user