aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorGregory Maxwell <greg@xiph.org>2016-06-11 00:26:16 +0000
committerGregory Maxwell <greg@xiph.org>2016-06-15 09:56:28 +0000
commit11cc143895e730002749f0881c4c95635fa54bd5 (patch)
treee0e9ad81dbaba5081304341cb49d44a7d0602c92 /src/main.h
parentdb0ffe80a0919653f058ab0f1fc735f46bb902f3 (diff)
Adds an expiration time for orphan tx.
This prevents higher order orphans and other junk from holding positions in the orphan map. Parents delayed twenty minutes are more are unlikely to ever arrive. The freed space will improve the orphan matching success rate for other transactions.
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.h b/src/main.h
index 9b99ae7c87..191aafe043 100644
--- a/src/main.h
+++ b/src/main.h
@@ -56,6 +56,10 @@ static const CAmount HIGH_TX_FEE_PER_KB = 0.01 * COIN;
static const CAmount HIGH_MAX_TX_FEE = 100 * HIGH_TX_FEE_PER_KB;
/** Default for -maxorphantx, maximum number of orphan transactions kept in memory */
static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 100;
+/** Expiration time for orphan transactions in seconds */
+static const int64_t ORPHAN_TX_EXPIRE_TIME = 20 * 60;
+/** Minimum time between orphan transactions expire time checks in seconds */
+static const int64_t ORPHAN_TX_EXPIRE_INTERVAL = 5 * 60;
/** Default for -limitancestorcount, max number of in-mempool ancestors */
static const unsigned int DEFAULT_ANCESTOR_LIMIT = 25;
/** Default for -limitancestorsize, maximum kilobytes of tx + all in-mempool ancestors */