aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Sanders <gsanders87@gmail.com>2024-06-07 10:05:37 -0400
committerGreg Sanders <gsanders87@gmail.com>2024-06-07 10:06:29 -0400
commit28dbe218feef51cbc28051273334dd73ba4500c0 (patch)
treed1ae42f832be7ba96658262599bb01bb3369b020
parentfeab35189bc00bc4cf15e9dcb5cf6b34ff3a1e91 (diff)
refactor: move orphanage constants to header file
-rw-r--r--src/txorphanage.cpp6
-rw-r--r--src/txorphanage.h5
2 files changed, 5 insertions, 6 deletions
diff --git a/src/txorphanage.cpp b/src/txorphanage.cpp
index 3eaf53939d..ee8e323cd7 100644
--- a/src/txorphanage.cpp
+++ b/src/txorphanage.cpp
@@ -12,12 +12,6 @@
#include <cassert>
-/** Expiration time for orphan transactions */
-static constexpr auto ORPHAN_TX_EXPIRE_TIME{20min};
-/** Minimum time between orphan transactions expire time checks */
-static constexpr auto ORPHAN_TX_EXPIRE_INTERVAL{5min};
-
-
bool TxOrphanage::AddTx(const CTransactionRef& tx, NodeId peer)
{
LOCK(m_mutex);
diff --git a/src/txorphanage.h b/src/txorphanage.h
index 3054396b2d..9f4531c48d 100644
--- a/src/txorphanage.h
+++ b/src/txorphanage.h
@@ -14,6 +14,11 @@
#include <map>
#include <set>
+/** Expiration time for orphan transactions */
+static constexpr auto ORPHAN_TX_EXPIRE_TIME{20min};
+/** Minimum time between orphan transactions expire time checks */
+static constexpr auto ORPHAN_TX_EXPIRE_INTERVAL{5min};
+
/** A class to track orphan transactions (failed on TX_MISSING_INPUTS)
* Since we cannot distinguish orphans from bad transactions with
* non-existent inputs, we heavily limit the number of orphans