Default policy: reduce default mempool expiry time

Reduces DEFAULT_MEMPOOL_EXPIRY from 336 hours to 24 hours.
Motivation is that while blocks are empty, un-relayable tx are
stuck in mempools for a long time and effectively locking utxo
for 2 weeks until they can be respent, if no RBF opt-in was
performed (most wallet implementations do not do RBF opt-in.)
As the expectation is that block space will not be fully utilized
for the foreseeable future, and therefore, as long as this is the
case, no valid transaction should ever live in the mempool for
more than a couple of minutes.

This default setting can be overridden with the -mempoolexpiry
parameter by individual node operators to a value (expressed
in hours) that makes the most sense for the use cases the node
serves.
This commit is contained in:
Patrick Lodder 2021-01-27 13:20:27 +01:00
parent f6e7d736d3
commit d62033cb90
No known key found for this signature in database
GPG key ID: 2D3A345B98D0DC1F

View file

@ -70,7 +70,7 @@ static const unsigned int DEFAULT_DESCENDANT_LIMIT = 25;
/** Default for -limitdescendantsize, maximum kilobytes of in-mempool descendants */
static const unsigned int DEFAULT_DESCENDANT_SIZE_LIMIT = 101;
/** Default for -mempoolexpiry, expiration time for mempool transactions in hours */
static const unsigned int DEFAULT_MEMPOOL_EXPIRY = 336;
static const unsigned int DEFAULT_MEMPOOL_EXPIRY = 24;
/** The maximum size of a blk?????.dat file (since 0.8) */
static const unsigned int MAX_BLOCKFILE_SIZE = 0x8000000; // 128 MiB
/** The pre-allocation chunk size for blk?????.dat files (since 0.8) */