Anthony Towns
03257b832d
txorphanage: Extract EraseOrphansForBlock
...
Extract code that erases orphans when a new block is found into
EraseOrphansForBlock.
2021-02-27 00:31:09 +10:00
Anthony Towns
1041616d7e
txorphanage: Extract OrphanageAddTx
...
Extract code from AddOrphanTx into OrphanageAddTx.
2021-02-26 23:55:10 +10:00
Anthony Towns
f294da7274
txorphanage: Extract GetOrphanTx
...
Extract orphan lookup code into GetOrphanTx function.
2021-02-26 23:55:10 +10:00
Anthony Towns
83679ffc60
txorphanage: Extract HaveOrphanTx
...
Extract some common code into HaveOrphanTx function.
2021-02-26 23:55:10 +10:00
Anthony Towns
ee135c8d5b
txorphanage: Extract AddChildrenToWorkSet
...
Extract some common code into AddChildrenToWorkSet function.
(It's a hard knock life)
2021-02-26 23:55:10 +10:00
Anthony Towns
38a11c355a
txorphanage: Add lock annotations
...
EraseOrphansFor was called both with and without g_cs_orphans held,
correct that so that it's always called with it already held.
LimitOrphanTxSize was always called with g_cs_orphans held, so
add annotations and don't lock it a second time.
2021-02-26 23:55:10 +10:00
Anthony Towns
81dd57e5b1
txorphanage: Pass uint256 by reference instead of value
2021-02-26 23:55:07 +10:00
Anthony Towns
9d5313df7e
move-only: Add txorphanage module
...
This module captures orphan tracking code for tx relay.
Can be reviewed with --color-moved=dimmed-zebra
2021-02-26 23:55:03 +10:00