|
|
@ -20,6 +20,7 @@ |
|
|
|
#include "init.h" |
|
|
|
#include "init.h" |
|
|
|
#include "policy/fees.h" |
|
|
|
#include "policy/fees.h" |
|
|
|
#include "policy/policy.h" |
|
|
|
#include "policy/policy.h" |
|
|
|
|
|
|
|
#include "policy/rbf.h" |
|
|
|
#include "pow.h" |
|
|
|
#include "pow.h" |
|
|
|
#include "primitives/block.h" |
|
|
|
#include "primitives/block.h" |
|
|
|
#include "primitives/transaction.h" |
|
|
|
#include "primitives/transaction.h" |
|
|
@ -488,9 +489,9 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool |
|
|
|
if (!setConflicts.count(ptxConflicting->GetHash())) |
|
|
|
if (!setConflicts.count(ptxConflicting->GetHash())) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// Allow opt-out of transaction replacement by setting
|
|
|
|
// Allow opt-out of transaction replacement by setting
|
|
|
|
// nSequence >= maxint-1 on all inputs.
|
|
|
|
// nSequence > MAX_BIP125_RBF_SEQUENCE (SEQUENCE_FINAL-2) on all inputs.
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// maxint-1 is picked to still allow use of nLockTime by
|
|
|
|
// SEQUENCE_FINAL-1 is picked to still allow use of nLockTime by
|
|
|
|
// non-replaceable transactions. All inputs rather than just one
|
|
|
|
// non-replaceable transactions. All inputs rather than just one
|
|
|
|
// is for the sake of multi-party protocols, where we don't
|
|
|
|
// is for the sake of multi-party protocols, where we don't
|
|
|
|
// want a single party to be able to disable replacement.
|
|
|
|
// want a single party to be able to disable replacement.
|
|
|
@ -504,7 +505,7 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool |
|
|
|
{ |
|
|
|
{ |
|
|
|
for (const CTxIn &_txin : ptxConflicting->vin) |
|
|
|
for (const CTxIn &_txin : ptxConflicting->vin) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (_txin.nSequence < std::numeric_limits<unsigned int>::max()-1) |
|
|
|
if (_txin.nSequence <= MAX_BIP125_RBF_SEQUENCE) |
|
|
|
{ |
|
|
|
{ |
|
|
|
fReplacementOptOut = false; |
|
|
|
fReplacementOptOut = false; |
|
|
|
break; |
|
|
|
break; |
|
|
|