diff options
| author | Wladimir J. van der Laan <[email protected]> | 2016-01-21 12:34:40 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2016-01-21 12:36:41 +0100 |
| commit | 6f7841d5455832bceeb0b1375baef772099d5595 (patch) | |
| tree | 58dfaa61ddf765388da9e98c4ed5b16092796b32 /src/main.cpp | |
| parent | Merge #7383: [Qt] rename "amount" to "requested amount" in receive coins table (diff) | |
| parent | Add option `-permitrbf` to set transaction replacement policy (diff) | |
| download | discoin-6f7841d5455832bceeb0b1375baef772099d5595.tar.xz discoin-6f7841d5455832bceeb0b1375baef772099d5595.zip | |
Merge #7386: Add option `-permitrbf` to set transaction replacement policy
b768108 Add option `-permitrbf` to set transaction replacement policy (Wladimir J. van der Laan)
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp index 9870beecc..8522b0d1b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -78,6 +78,7 @@ bool fAlerts = DEFAULT_ALERTS; /* If the tip is older than this (in seconds), the node is considered to be in initial block download. */ int64_t nMaxTipAge = DEFAULT_MAX_TIP_AGE; +bool fPermitReplacement = DEFAULT_PERMIT_REPLACEMENT; /** Fees smaller than this (in satoshi) are considered zero fee (for relaying, mining and transaction creation) */ CFeeRate minRelayTxFee = CFeeRate(DEFAULT_MIN_RELAY_TX_FEE); @@ -868,12 +869,15 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState &state, const C // unconfirmed ancestors anyway; doing otherwise is hopelessly // insecure. bool fReplacementOptOut = true; - BOOST_FOREACH(const CTxIn &txin, ptxConflicting->vin) + if (fPermitReplacement) { - if (txin.nSequence < std::numeric_limits<unsigned int>::max()-1) + BOOST_FOREACH(const CTxIn &txin, ptxConflicting->vin) { - fReplacementOptOut = false; - break; + if (txin.nSequence < std::numeric_limits<unsigned int>::max()-1) + { + fReplacementOptOut = false; + break; + } } } if (fReplacementOptOut) |