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)
1194
1194
assert (m_outbound_peers_with_protect_from_disconnect == 0 );
1195
1195
assert (m_wtxid_relay_peers == 0 );
1196
1196
assert (m_txrequest.Size () == 0 );
1197
+ assert (m_orphanage.Size () == 0 );
1197
1198
}
1198
1199
} // cs_main
1199
1200
if (node.fSuccessfullyConnected && misbehavior == 0 &&
Original file line number Diff line number Diff line change @@ -47,6 +47,13 @@ class TxOrphanage {
47
47
* (ie orphans that may have found their final missing parent, and so should be reconsidered for the mempool) */
48
48
void AddChildrenToWorkSet (const CTransaction& tx, std::set<uint256>& orphan_work_set) const EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans);
49
49
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
+
50
57
protected:
51
58
struct OrphanTx {
52
59
CTransactionRef tx;
You can’t perform that action at this time.
0 commit comments