From 28dbe218feef51cbc28051273334dd73ba4500c0 Mon Sep 17 00:00:00 2001 From: Greg Sanders Date: Fri, 7 Jun 2024 10:05:37 -0400 Subject: [PATCH] refactor: move orphanage constants to header file --- src/txorphanage.cpp | 6 ------ src/txorphanage.h | 5 +++++ 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 -/** 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 #include +/** 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