mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 02:33:24 -03:00
refactor: move orphanage constants to header file
This commit is contained in:
parent
feab35189b
commit
28dbe218fe
2 changed files with 5 additions and 6 deletions
|
@ -12,12 +12,6 @@
|
||||||
|
|
||||||
#include <cassert>
|
#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)
|
bool TxOrphanage::AddTx(const CTransactionRef& tx, NodeId peer)
|
||||||
{
|
{
|
||||||
LOCK(m_mutex);
|
LOCK(m_mutex);
|
||||||
|
|
|
@ -14,6 +14,11 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#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)
|
/** A class to track orphan transactions (failed on TX_MISSING_INPUTS)
|
||||||
* Since we cannot distinguish orphans from bad transactions with
|
* Since we cannot distinguish orphans from bad transactions with
|
||||||
* non-existent inputs, we heavily limit the number of orphans
|
* non-existent inputs, we heavily limit the number of orphans
|
||||||
|
|
Loading…
Add table
Reference in a new issue