mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Make it possible to unconditionally RBF with mempoolreplacement=fee,-optin
This commit is contained in:
parent
d0cccad9d4
commit
0853a234a4
3 changed files with 16 additions and 1 deletions
|
|
@ -233,6 +233,7 @@ size_t nCoinCacheUsage = 5000 * 300;
|
|||
uint64_t nPruneTarget = 0;
|
||||
int64_t nMaxTipAge = DEFAULT_MAX_TIP_AGE;
|
||||
bool fEnableReplacement = DEFAULT_ENABLE_REPLACEMENT;
|
||||
bool fReplacementHonourOptOut = DEFAULT_REPLACEMENT_HONOUR_OPTOUT;
|
||||
|
||||
uint256 hashAssumeValid;
|
||||
arith_uint256 nMinimumChainWork;
|
||||
|
|
@ -623,6 +624,7 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool
|
|||
bool fReplacementOptOut = true;
|
||||
if (fEnableReplacement)
|
||||
{
|
||||
if (fReplacementHonourOptOut) {
|
||||
for (const CTxIn &_txin : ptxConflicting->vin)
|
||||
{
|
||||
if (_txin.nSequence <= MAX_BIP125_RBF_SEQUENCE)
|
||||
|
|
@ -631,6 +633,9 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool
|
|||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
fReplacementOptOut = false;
|
||||
}
|
||||
}
|
||||
if (fReplacementOptOut) {
|
||||
return state.Invalid(false, REJECT_DUPLICATE, "txn-mempool-conflict");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue