File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1194,6 +1194,7 @@ void PeerManagerImpl::FinalizeNode(const CNode& node)
11941194 assert (m_outbound_peers_with_protect_from_disconnect == 0 );
11951195 assert (m_wtxid_relay_peers == 0 );
11961196 assert (m_txrequest.Size () == 0 );
1197+ assert (m_orphanage.Size () == 0 );
11971198 }
11981199 } // cs_main
11991200 if (node.fSuccessfullyConnected && misbehavior == 0 &&
Original file line number Diff line number Diff line change @@ -47,6 +47,13 @@ class TxOrphanage {
4747 * (ie orphans that may have found their final missing parent, and so should be reconsidered for the mempool) */
4848 void AddChildrenToWorkSet (const CTransaction& tx, std::set<uint256>& orphan_work_set) const EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans);
4949
50+ /* * Return how many entries exist in the orphange */
51+ size_t Size () LOCKS_EXCLUDED(::g_cs_orphans)
52+ {
53+ LOCK (::g_cs_orphans);
54+ return m_orphans.size ();
55+ }
56+
5057protected:
5158 struct OrphanTx {
5259 CTransactionRef tx;
You can’t perform that action at this time.
0 commit comments