aboutsummaryrefslogtreecommitdiff
path: root/src/txorphanage.h
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2021-01-31 23:37:41 +1000
committerAnthony Towns <aj@erisian.com.au>2021-02-27 00:31:09 +1000
commit03257b832debcb1470420d8657d30ba30f4be770 (patch)
tree37d9ea35a839832c1629523ef8345139e0bd55c7 /src/txorphanage.h
parent3c4c3c2fdda3a361e3802e97bc3566f815b75de1 (diff)
downloadbitcoin-03257b832debcb1470420d8657d30ba30f4be770.tar.xz
txorphanage: Extract EraseOrphansForBlock
Extract code that erases orphans when a new block is found into EraseOrphansForBlock.
Diffstat (limited to 'src/txorphanage.h')
-rw-r--r--src/txorphanage.h2
1 files changed, 2 insertions, 0 deletions
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 <net.h>
+#include <primitives/block.h>
#include <primitives/transaction.h>
#include <sync.h>
@@ -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<uint256>& orphan_work_set) EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans);
bool HaveOrphanTx(const GenTxid& gtxid) EXCLUSIVE_LOCKS_REQUIRED(!g_cs_orphans);