aboutsummaryrefslogtreecommitdiff
path: root/src/txorphanage.h
AgeCommit message (Collapse)Author
2022-12-24scripted-diff: Bump copyright headersHennadii Stepanov
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT- Commits of previous years: - 2021: f47dda2c58b5d8d623e0e7ff4e74bc352dfa83d7 - 2020: fa0074e2d82928016a43ca408717154a1c70a4db - 2019: aaaaad6ac95b402fe18d019d67897ced6b316ee0
2022-10-11scripted-diff: rename and de-globalise g_cs_orphansAnthony Towns
-BEGIN VERIFY SCRIPT- sed -i -e 's/static RecursiveMutex/mutable Mutex/' src/txorphanage.h sed -i -e '/RecursiveMutex/d' src/txorphanage.cpp sed -i -e 's/g_cs_orphans/m_mutex/g' $(git grep -l g_cs_orphans src/) -END VERIFY SCRIPT-
2022-10-11Move all g_cs_orphans locking to txorphanageAnthony Towns
2022-10-11txorphanage: make m_peer_work_set privateAnthony Towns
2022-10-11txorphange: move orphan workset to txorphanageAnthony Towns
2022-10-07net_processing: move extra transactions to msgproc mutexAnthony Towns
Previously vExtraTxnForCompact and vExtraTxnForCompactIt were protected by g_cs_orphans; protect them by g_msgproc_mutex instead, as they are only used during message processing.
2022-07-28refactor: log `nEvicted` message in `LimitOrphans` then return voidchinggg
`LimitOrphans()` can log expired tx and it should log evicted tx as well instead of returning the number for caller to print the message. Since `LimitOrphans()` now return void, the redundant assertion check in fuzz test is also removed.
2021-07-20[net processing] Add Orphanage empty consistency checkJohn Newbery
When removing the final peer, assert that m_tx_orphanage is empty.
2021-04-07doc: Fix typos from codespell lintYerzhan Mazhkenov
2021-04-05refactor: Remove negative lock annotations from globalsMarcoFalke
2021-03-02txorphanage: comment improvementsAnthony Towns
2021-02-27scripted-diff: Update txorphanage naming conventionAnthony Towns
-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-
2021-02-27txorphanage: Move functions and data into classAnthony Towns
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.
2021-02-27txorphanage: Extract EraseOrphansForBlockAnthony Towns
Extract code that erases orphans when a new block is found into EraseOrphansForBlock.
2021-02-26txorphanage: Extract OrphanageAddTxAnthony Towns
Extract code from AddOrphanTx into OrphanageAddTx.
2021-02-26txorphanage: Extract GetOrphanTxAnthony Towns
Extract orphan lookup code into GetOrphanTx function.
2021-02-26txorphanage: Extract HaveOrphanTxAnthony Towns
Extract some common code into HaveOrphanTx function.
2021-02-26txorphanage: Extract AddChildrenToWorkSetAnthony Towns
Extract some common code into AddChildrenToWorkSet function. (It's a hard knock life)
2021-02-26txorphanage: Add lock annotationsAnthony Towns
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-26txorphanage: Pass uint256 by reference instead of valueAnthony Towns
2021-02-26move-only: Add txorphanage moduleAnthony Towns
This module captures orphan tracking code for tx relay. Can be reviewed with --color-moved=dimmed-zebra