The transaction thats being accepted can't be an orphan otherwise it would have previously been accepted, so doesn't need to be added to the erase queue. We also don't want to erase orphans that still have missing inputs.
Fix removing of orphan transactions #5985
pull morcos wants to merge 1 commits into bitcoin:master from morcos:fix-orphans changing 1 files +4 −3-
morcos commented at 5:10 PM on April 8, 2015: member
-
dgenr8 commented at 9:12 PM on April 13, 2015: contributor
utACK
-
in src/main.cpp:None in 3588633a87 outdated
4026 | @@ -4028,6 +4027,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, 4027 | } 4028 | // too-little-fee orphan
dgenr8 commented at 9:13 PM on April 13, 2015:This (pre-existing) comment is too specific to be correct.
in src/main.cpp:None in 3588633a87 outdated
3978 | @@ -3979,7 +3979,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, 3979 | mempool.check(pcoinsTip); 3980 | RelayTransaction(tx); 3981 | vWorkQueue.push_back(inv.hash); 3982 | - vEraseQueue.push_back(inv.hash);
sipa commented at 2:47 PM on April 27, 2015:Why can't we mark a tx for removal already? It was accepted into the memory pool, so alls its inputs must be satisfied?
morcos commented at 2:58 PM on April 27, 2015:This tx isn't in the orphan map. We're just now receiving it off the network and accepting it to the mempool, so it never entered the orphan map. If it was a duplicate transaction that was an orphan the first time it was received, it would have previously been accepted to the mempool at the time its inputs were satisfied, and wouldn't be accepted here.
It doesn't hurt to add tx to vEraseQueue, but its unnecessary and confuses the logic.
laanwj added the label Bug on Apr 29, 201514d4eef799Fix removing of orphan transactions
We don't want to erase orphans that still have missing inputs, they should still be tracked as orphans. Also, the transaction thats being accepted can't be an orphan otherwise it would have previously been accepted, so doesn't need to be added to the erase queue.
morcos force-pushed on May 12, 2015morcos commented at 4:15 PM on May 12, 2015: memberFixed comment nit and clarified commit message
mrbandrews commented at 7:51 PM on May 27, 2015: contributorTested ACK
laanwj commented at 10:14 AM on June 10, 2015: memberutACK
laanwj merged this on Jun 10, 2015laanwj closed this on Jun 10, 2015laanwj referenced this in commit 3a1d3e8f52 on Jun 10, 2015laanwj referenced this in commit 37b4e425af on Jun 10, 2015laanwj commented at 10:18 AM on June 10, 2015: memberCherry-picked to 0.11 branch as 37b4e425af00b285fb66ac1169d1c115e924b9a2
MarcoFalke locked this on Sep 8, 2021
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 12:15 UTC
More mirrored repositories can be found on mirror.b10c.me