diff options
author | Anthony Towns <aj@erisian.com.au> | 2021-02-25 00:03:23 +1000 |
---|---|---|
committer | Anthony Towns <aj@erisian.com.au> | 2022-10-11 14:04:49 +1000 |
commit | 3614819864a84ac32f6d53c6ace79b5e71bc174a (patch) | |
tree | 94cf6c60a71d3da7cb7ed1a6f9e4d0a763cc843e /src/txorphanage.h | |
parent | 6f8e442ba61378489a6e2e2ab5bcfbccca1a29ec (diff) | |
download | bitcoin-3614819864a84ac32f6d53c6ace79b5e71bc174a.tar.xz |
txorphange: move orphan workset to txorphanage
Diffstat (limited to 'src/txorphanage.h')
-rw-r--r-- | src/txorphanage.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/txorphanage.h b/src/txorphanage.h index 92f4319d7d..aff57e84f7 100644 --- a/src/txorphanage.h +++ b/src/txorphanage.h @@ -43,9 +43,11 @@ public: /** Limit the orphanage to the given maximum */ void LimitOrphans(unsigned int max_orphans) EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans); - /** Add any orphans that list a particular tx as a parent into a peer's work set - * (ie orphans that may have found their final missing parent, and so should be reconsidered for the mempool) */ - void AddChildrenToWorkSet(const CTransaction& tx, std::set<uint256>& orphan_work_set) const EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans); + /** Which peer provided a parent tx of orphans that need to be reconsidered */ + std::map<NodeId, std::set<uint256>> m_peer_work_set GUARDED_BY(g_cs_orphans); + + /** Add any orphans that list a particular tx as a parent into a peer's work set */ + void AddChildrenToWorkSet(const CTransaction& tx, NodeId peer) EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans); /** Return how many entries exist in the orphange */ size_t Size() LOCKS_EXCLUDED(::g_cs_orphans) |