aboutsummaryrefslogtreecommitdiff
path: root/src/txorphanage.h
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2021-01-31 23:12:24 +1000
committerAnthony Towns <aj@erisian.com.au>2021-02-26 23:55:10 +1000
commit1041616d7eb66281bb4de51ffbc83df0923b2f7e (patch)
treedd8cc8d2d577f18ab8df56f3b9b6e12e9d949f3b /src/txorphanage.h
parentf294da727413210fda279afdc206a4dd12046d56 (diff)
downloadbitcoin-1041616d7eb66281bb4de51ffbc83df0923b2f7e.tar.xz
txorphanage: Extract OrphanageAddTx
Extract code from AddOrphanTx into OrphanageAddTx.
Diffstat (limited to 'src/txorphanage.h')
-rw-r--r--src/txorphanage.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/txorphanage.h b/src/txorphanage.h
index 1adc6f1d6c..1a72af175c 100644
--- a/src/txorphanage.h
+++ b/src/txorphanage.h
@@ -9,9 +9,6 @@
#include <primitives/transaction.h>
#include <sync.h>
-/** Expiration time for orphan transactions in seconds */
-static constexpr int64_t ORPHAN_TX_EXPIRE_TIME = 20 * 60;
-
/** Guards orphan transactions and extra txs for compact blocks */
extern RecursiveMutex g_cs_orphans;
@@ -29,6 +26,7 @@ unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans) EXCLUSIVE_LOCKS_REQUIRE
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);
std::pair<CTransactionRef, NodeId> GetOrphanTx(const uint256& txid) EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans);
+bool OrphanageAddTx(const CTransactionRef& tx, NodeId peer) EXCLUSIVE_LOCKS_REQUIRED(g_cs_orphans);
/** Map from txid to orphan transaction record. Limited by
* -maxorphantx/DEFAULT_MAX_ORPHAN_TRANSACTIONS */