Skip to content

Commit 63b62e1

Browse files
committed
[doc] fix docs and comments from v3
1 parent e3c1711 commit 63b62e1

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

doc/policy/mempool-replacements.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ other consensus and policy rules, each of the following conditions are met:
1212

1313
1. The directly conflicting transactions all signal replaceability explicitly. A transaction is
1414
signaling BIP125 replaceability if any of its inputs have an nSequence number less than (0xffffffff - 1).
15-
A transaction also signals replaceibility if its nVersion field is set to 3.
15+
A transaction also signals replaceability if its nVersion field is set to 3.
1616

1717
*Rationale*: See [BIP125
1818
explanation](https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki#motivation).

src/policy/v3_policy.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,16 @@ std::optional<std::string> PackageV3Checks(const CTransactionRef& ptx, int64_t v
8181
vsize, V3_CHILD_MAX_VSIZE);
8282
}
8383

84+
// Exactly 1 parent exists, either in mempool or package. Find it.
8485
const auto parent_info = [&] {
8586
if (mempool_ancestors.size() > 0) {
86-
// There's a parent in the mempool.
8787
auto& mempool_parent = *mempool_ancestors.begin();
8888
Assume(mempool_parent->GetCountWithDescendants() == 1);
8989
return ParentInfo{mempool_parent->GetTx().GetHash(),
9090
mempool_parent->GetTx().GetWitnessHash(),
9191
mempool_parent->GetTx().nVersion,
9292
/*has_mempool_descendant=*/mempool_parent->GetCountWithDescendants() > 1};
9393
} else {
94-
// Ancestor must be in the package. Find it.
9594
auto& parent_index = in_package_parents.front();
9695
auto& package_parent = package.at(parent_index);
9796
return ParentInfo{package_parent->GetHash(),
@@ -184,7 +183,7 @@ std::optional<std::string> SingleV3Checks(const CTransactionRef& ptx,
184183
// The rest of the rules only apply to transactions with nVersion=3.
185184
if (ptx->nVersion != 3) return std::nullopt;
186185

187-
// Check that V3_ANCESTOR_LIMIT would not be violated, including both in-package and in-mempool.
186+
// Check that V3_ANCESTOR_LIMIT would not be violated.
188187
if (mempool_ancestors.size() + 1 > V3_ANCESTOR_LIMIT) {
189188
return strprintf("tx %s (wtxid=%s) would have too many ancestors",
190189
ptx->GetHash().ToString(), ptx->GetWitnessHash().ToString());

src/test/fuzz/tx_pool.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,6 @@ FUZZ_TARGET(tx_pool, .init = initialize_tx_pool)
407407
const bool accepted = res.m_result_type == MempoolAcceptResult::ResultType::VALID;
408408
if (accepted) {
409409
txids.push_back(tx->GetHash());
410-
// Only check fees if accepted and not bypass_limits, otherwise it's not guaranteed that
411-
// trimming has happened for this tx and previous iterations.
412410
CheckMempoolV3Invariants(tx_pool);
413411
}
414412
}

0 commit comments

Comments
 (0)