Skip to content

Commit 28dbe21

Browse files
committed
refactor: move orphanage constants to header file
1 parent feab351 commit 28dbe21

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/txorphanage.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@
1212

1313
#include <cassert>
1414

15-
/** Expiration time for orphan transactions */
16-
static constexpr auto ORPHAN_TX_EXPIRE_TIME{20min};
17-
/** Minimum time between orphan transactions expire time checks */
18-
static constexpr auto ORPHAN_TX_EXPIRE_INTERVAL{5min};
19-
20-
2115
bool TxOrphanage::AddTx(const CTransactionRef& tx, NodeId peer)
2216
{
2317
LOCK(m_mutex);

src/txorphanage.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
#include <map>
1515
#include <set>
1616

17+
/** Expiration time for orphan transactions */
18+
static constexpr auto ORPHAN_TX_EXPIRE_TIME{20min};
19+
/** Minimum time between orphan transactions expire time checks */
20+
static constexpr auto ORPHAN_TX_EXPIRE_INTERVAL{5min};
21+
1722
/** A class to track orphan transactions (failed on TX_MISSING_INPUTS)
1823
* Since we cannot distinguish orphans from bad transactions with
1924
* non-existent inputs, we heavily limit the number of orphans

0 commit comments

Comments
 (0)