mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-09 15:18:03 +02:00
Merge bitcoin/bitcoin#34989: doc: remove stale shortid collision TODO
fc9987dfc6doc: remove stale shortid collision TODO (w0xlt) Pull request description: `PartiallyDownloadedBlock::InitData()` already 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 scanning the mempool or attempting selective recovery (see https://github.com/bitcoin/bitcoin/pull/34932#issuecomment-4139177024) This removes the old TODO suggesting that both collided transactions should be requested, since that comment no longer matches the intended handling. No behavior change. Comment-only cleanup. ACKs for top commit: l0rinc: ACKfc9987dfc6instagibbs: ACKfc9987dfc6Tree-SHA512: 46d8a64076e29b6dd6b6ccbfc74101da00dea0c7e88a94b10136585b8df82bb328a4922aa9ac1cd0dfc7f9d491b3fff59492e2d445d91e48668fe0c375a70a85
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