John Newbery
9190b01d8d
[net processing] Add Orphanage empty consistency check
...
When removing the final peer, assert that m_tx_orphanage is empty.
3 years ago
Yerzhan Mazhkenov
94c7dd9ac8
doc: Fix typos from codespell lint
4 years ago
MarcoFalke
fa5eabe721
refactor: Remove negative lock annotations from globals
4 years ago
Anthony Towns
5e50e2d1b9
txorphanage: comment improvements
4 years ago
Anthony Towns
f8c0688b94
scripted-diff: Update txorphanage naming convention
...
-BEGIN VERIFY SCRIPT-
sed -i 's/mapOrphanTransactionsByPrev/m_outpoint_to_orphan_it/g' src/txorphanage.h src/txorphanage.cpp
sed -i 's/mapOrphanTransactions/m_orphans/g' src/txorphanage.h src/txorphanage.cpp src/net_processing.cpp src/test/denialofservice_tests.cpp
sed -i 's/g_orphan_list/m_orphan_list/g' src/txorphanage.h src/txorphanage.cpp
sed -i 's/g_orphans_by_wtxid/m_wtxid_to_orphan_it/g' src/txorphanage.h src/txorphanage.cpp
sed -i 's/nMaxOrphans/max_orphans/g' src/txorphanage.h src/txorphanage.cpp
sed -i 's/COrphanTx/OrphanTx/g' src/txorphanage.h src/txorphanage.cpp src/test/denialofservice_tests.cpp
-END VERIFY SCRIPT-
4 years ago
Anthony Towns
6bd4963c06
txorphanage: Move functions and data into class
...
Collects all the orphan handling globals into a single member var in
net_processing, and ensures access is encapuslated into the interface
functions. Also adds doxygen comments for methods.
4 years ago
Anthony Towns
03257b832d
txorphanage: Extract EraseOrphansForBlock
...
Extract code that erases orphans when a new block is found into
EraseOrphansForBlock.
4 years ago
Anthony Towns
1041616d7e
txorphanage: Extract OrphanageAddTx
...
Extract code from AddOrphanTx into OrphanageAddTx.
4 years ago
Anthony Towns
f294da7274
txorphanage: Extract GetOrphanTx
...
Extract orphan lookup code into GetOrphanTx function.
4 years ago
Anthony Towns
83679ffc60
txorphanage: Extract HaveOrphanTx
...
Extract some common code into HaveOrphanTx function.
4 years ago
Anthony Towns
ee135c8d5b
txorphanage: Extract AddChildrenToWorkSet
...
Extract some common code into AddChildrenToWorkSet function.
(It's a hard knock life)
4 years ago
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.
4 years ago
Anthony Towns
81dd57e5b1
txorphanage: Pass uint256 by reference instead of value
4 years ago
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
4 years ago