Add option -permitrbf to set transaction replacement policy

Add a configuration option `-permitrbf` to set transaction replacement policy
for the mempool.

Enabling it will enable (opt-in) RBF, disabling it will refuse all
conflicting transactions.
This commit is contained in:
Wladimir J. van der Laan
2016-01-21 11:11:01 +01:00
parent ae2db67fee
commit b768108d9c
3 changed files with 13 additions and 4 deletions

View File

@@ -107,6 +107,8 @@ static const bool DEFAULT_TXINDEX = false;
static const unsigned int DEFAULT_BANSCORE_THRESHOLD = 100;
static const bool DEFAULT_TESTSAFEMODE = false;
/** Default for -permitrbf */
static const bool DEFAULT_PERMIT_REPLACEMENT = true;
/** Maximum number of headers to announce when relaying blocks with headers message.*/
static const unsigned int MAX_BLOCKS_TO_ANNOUNCE = 8;
@@ -139,6 +141,7 @@ extern size_t nCoinCacheUsage;
extern CFeeRate minRelayTxFee;
extern bool fAlerts;
extern int64_t nMaxTipAge;
extern bool fPermitReplacement;
/** Best header we've seen so far (used for getheaders queries' starting points). */
extern CBlockIndex *pindexBestHeader;