refactor: move orphanage constants to header file

This commit is contained in:
Greg Sanders committed 2024-06-07 10:06:29 -04:00
1 parent feab35189b
commit 28dbe218fe
2 files changed
+5 -6

No files matched your search

-6
View File
@@ -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);
+5
View File
@@ -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