From 03257b832debcb1470420d8657d30ba30f4be770 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Sun, 31 Jan 2021 23:37:41 +1000 Subject: txorphanage: Extract EraseOrphansForBlock Extract code that erases orphans when a new block is found into EraseOrphansForBlock. --- src/txorphanage.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/txorphanage.h') diff --git a/src/txorphanage.h b/src/txorphanage.h index 1a72af175c..f2ffbf3d67 100644 --- a/src/txorphanage.h +++ b/src/txorphanage.h @@ -6,6 +6,7 @@ #define BITCOIN_TXORPHANAGE_H #include +#include #include #include @@ -22,6 +23,7 @@ struct COrphanTx { int EraseOrphanTx(const uint256& txid) EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans); void EraseOrphansFor(NodeId peer) EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans); +void EraseOrphansForBlock(const CBlock& block) EXCLUSIVE_LOCKS_REQUIRED(!g_cs_orphans); unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans) EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans); void AddChildrenToWorkSet(const CTransaction& tx, std::set& orphan_work_set) EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans); bool HaveOrphanTx(const GenTxid& gtxid) EXCLUSIVE_LOCKS_REQUIRED(!g_cs_orphans); -- cgit v1.2.3