mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
scripted-diff: remove mention of BIP125 from non-signaling var names
Our RBF policy is different from the rules specified in BIP125 (refer to
doc/policy/mempool-replacements.md instead), and will continue to
diverge with package RBF. Keep references to BIP125 sequence number,
since that is still useful and correct.
-BEGIN VERIFY SCRIPT-
ren() { sed -i "s:\<$1\>:$2:g" $(git grep -l "\<$1\>" ./src ./test); }
ren m_allow_bip125_replacement m_allow_replacement
ren allow_bip125_replacement allow_replacement
ren MAX_BIP125_REPLACEMENT_CANDIDATES MAX_REPLACEMENT_CANDIDATES
-END VERIFY SCRIPT-
This commit is contained in:
@@ -450,7 +450,7 @@ public:
|
||||
/** Whether we allow transactions to replace mempool transactions by BIP125 rules. If false,
|
||||
* any transaction spending the same inputs as a transaction in the mempool is considered
|
||||
* a conflict. */
|
||||
const bool m_allow_bip125_replacement;
|
||||
const bool m_allow_replacement;
|
||||
/** When true, the mempool will not be trimmed when individual transactions are submitted in
|
||||
* Finalize(). Instead, limits should be enforced at the end to ensure the package is not
|
||||
* partially submitted.
|
||||
@@ -470,7 +470,7 @@ public:
|
||||
/* m_bypass_limits */ bypass_limits,
|
||||
/* m_coins_to_uncache */ coins_to_uncache,
|
||||
/* m_test_accept */ test_accept,
|
||||
/* m_allow_bip125_replacement */ true,
|
||||
/* m_allow_replacement */ true,
|
||||
/* m_package_submission */ false,
|
||||
/* m_package_feerates */ false,
|
||||
};
|
||||
@@ -484,7 +484,7 @@ public:
|
||||
/* m_bypass_limits */ false,
|
||||
/* m_coins_to_uncache */ coins_to_uncache,
|
||||
/* m_test_accept */ true,
|
||||
/* m_allow_bip125_replacement */ false,
|
||||
/* m_allow_replacement */ false,
|
||||
/* m_package_submission */ false, // not submitting to mempool
|
||||
/* m_package_feerates */ false,
|
||||
};
|
||||
@@ -498,7 +498,7 @@ public:
|
||||
/* m_bypass_limits */ false,
|
||||
/* m_coins_to_uncache */ coins_to_uncache,
|
||||
/* m_test_accept */ false,
|
||||
/* m_allow_bip125_replacement */ false,
|
||||
/* m_allow_replacement */ false,
|
||||
/* m_package_submission */ true,
|
||||
/* m_package_feerates */ true,
|
||||
};
|
||||
@@ -511,7 +511,7 @@ public:
|
||||
/* m_bypass_limits */ false,
|
||||
/* m_coins_to_uncache */ package_args.m_coins_to_uncache,
|
||||
/* m_test_accept */ package_args.m_test_accept,
|
||||
/* m_allow_bip125_replacement */ true,
|
||||
/* m_allow_replacement */ true,
|
||||
/* m_package_submission */ false,
|
||||
/* m_package_feerates */ false, // only 1 transaction
|
||||
};
|
||||
@@ -525,7 +525,7 @@ public:
|
||||
bool bypass_limits,
|
||||
std::vector<COutPoint>& coins_to_uncache,
|
||||
bool test_accept,
|
||||
bool allow_bip125_replacement,
|
||||
bool allow_replacement,
|
||||
bool package_submission,
|
||||
bool package_feerates)
|
||||
: m_chainparams{chainparams},
|
||||
@@ -533,7 +533,7 @@ public:
|
||||
m_bypass_limits{bypass_limits},
|
||||
m_coins_to_uncache{coins_to_uncache},
|
||||
m_test_accept{test_accept},
|
||||
m_allow_bip125_replacement{allow_bip125_replacement},
|
||||
m_allow_replacement{allow_replacement},
|
||||
m_package_submission{package_submission},
|
||||
m_package_feerates{package_feerates}
|
||||
{
|
||||
@@ -732,7 +732,7 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws)
|
||||
{
|
||||
const CTransaction* ptxConflicting = m_pool.GetConflictTx(txin.prevout);
|
||||
if (ptxConflicting) {
|
||||
if (!args.m_allow_bip125_replacement) {
|
||||
if (!args.m_allow_replacement) {
|
||||
// Transaction conflicts with a mempool tx, but we're not allowing replacements.
|
||||
return state.Invalid(TxValidationResult::TX_MEMPOOL_POLICY, "bip125-replacement-disallowed");
|
||||
}
|
||||
@@ -1225,7 +1225,7 @@ PackageMempoolAcceptResult MemPoolAccept::AcceptMultipleTransactions(const std::
|
||||
// package to spend. Since we already checked conflicts in the package and we don't allow
|
||||
// replacements, we don't need to track the coins spent. Note that this logic will need to be
|
||||
// updated if package replace-by-fee is allowed in the future.
|
||||
assert(!args.m_allow_bip125_replacement);
|
||||
assert(!args.m_allow_replacement);
|
||||
m_viewmempool.PackageAddTransaction(ws.m_ptx);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user