aboutsummaryrefslogtreecommitdiff
path: root/src/policy
diff options
context:
space:
mode:
authorglozow <gloriajzhao@gmail.com>2022-07-19 09:47:45 +0100
committerglozow <gloriajzhao@gmail.com>2022-08-03 12:42:32 +0100
commit32024d40f03fbf47c64d814fa5f2c2a73ec14cb7 (patch)
treed31c705cbb2b26001ef5dbf3a92c3af89ce1ec06 /src/policy
parent4a4289e2c98cfbc51b05716f21065838afed80f6 (diff)
downloadbitcoin-32024d40f03fbf47c64d814fa5f2c2a73ec14cb7.tar.xz
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-
Diffstat (limited to 'src/policy')
-rw-r--r--src/policy/rbf.cpp6
-rw-r--r--src/policy/rbf.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/policy/rbf.cpp b/src/policy/rbf.cpp
index e25f5c7c5b..d15946de21 100644
--- a/src/policy/rbf.cpp
+++ b/src/policy/rbf.cpp
@@ -65,15 +65,15 @@ std::optional<std::string> GetEntriesForConflicts(const CTransaction& tx,
uint64_t nConflictingCount = 0;
for (const auto& mi : iters_conflicting) {
nConflictingCount += mi->GetCountWithDescendants();
- // BIP125 Rule #5: don't consider replacing more than MAX_BIP125_REPLACEMENT_CANDIDATES
+ // BIP125 Rule #5: don't consider replacing more than MAX_REPLACEMENT_CANDIDATES
// entries from the mempool. This potentially overestimates the number of actual
// descendants (i.e. if multiple conflicts share a descendant, it will be counted multiple
// times), but we just want to be conservative to avoid doing too much work.
- if (nConflictingCount > MAX_BIP125_REPLACEMENT_CANDIDATES) {
+ if (nConflictingCount > MAX_REPLACEMENT_CANDIDATES) {
return strprintf("rejecting replacement %s; too many potential replacements (%d > %d)\n",
txid.ToString(),
nConflictingCount,
- MAX_BIP125_REPLACEMENT_CANDIDATES);
+ MAX_REPLACEMENT_CANDIDATES);
}
}
// Calculate the set of all transactions that would have to be evicted.
diff --git a/src/policy/rbf.h b/src/policy/rbf.h
index 07f68c8fd4..f3efcebbe0 100644
--- a/src/policy/rbf.h
+++ b/src/policy/rbf.h
@@ -21,7 +21,7 @@ class uint256;
/** Maximum number of transactions that can be replaced by BIP125 RBF (Rule #5). This includes all
* mempool conflicts and their descendants. */
-static constexpr uint32_t MAX_BIP125_REPLACEMENT_CANDIDATES{100};
+static constexpr uint32_t MAX_REPLACEMENT_CANDIDATES{100};
/** The rbf state of unconfirmed transactions */
enum class RBFTransactionState {
@@ -50,7 +50,7 @@ RBFTransactionState IsRBFOptInEmptyMempool(const CTransaction& tx);
/** Get all descendants of iters_conflicting. Also enforce BIP125 Rule #5, "The number of original
* transactions to be replaced and their descendant transactions which will be evicted from the
* mempool must not exceed a total of 100 transactions." Quit as early as possible. There cannot be
- * more than MAX_BIP125_REPLACEMENT_CANDIDATES potential entries.
+ * more than MAX_REPLACEMENT_CANDIDATES potential entries.
* @param[in] iters_conflicting The set of iterators to mempool entries.
* @param[out] all_conflicts Populated with all the mempool entries that would be replaced,
* which includes descendants of iters_conflicting. Not cleared at