From 3614819864a84ac32f6d53c6ace79b5e71bc174a Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Thu, 25 Feb 2021 00:03:23 +1000 Subject: txorphange: move orphan workset to txorphanage --- src/txorphanage.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/txorphanage.h') 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& 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> 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) -- cgit v1.2.3