Merge 82bc7faec8 into merged_master (Bitcoin PR bitcoin/bitcoin#21946)

Adds a new test which is broken, but which will be fixed in a few PRs.
Disabled it for now.
This commit is contained in:
Andrew Poelstra 2021-07-23 13:50:58 +00:00
commit b3fdb4bed1
2 changed files with 79 additions and 4 deletions

View file

@ -655,10 +655,13 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws)
// is for the sake of multi-party protocols, where we don't
// want a single party to be able to disable replacement.
//
// The opt-out ignores descendants as anyone relying on
// first-seen mempool behavior should be checking all
// unconfirmed ancestors anyway; doing otherwise is hopelessly
// insecure.
// Transactions that don't explicitly signal replaceability are
// *not* replaceable with the current logic, even if one of their
// unconfirmed ancestors signals replaceability. This diverges
// from BIP125's inherited signaling description (see CVE-2021-31876).
// Applications relying on first-seen mempool behavior should
// check all unconfirmed ancestors; otherwise an opt-in ancestor
// might be replaced, causing removal of this descendant.
bool fReplacementOptOut = true;
for (const CTxIn &_txin : ptxConflicting->vin)
{