Label and allow overriding bad-witness-anchor-not-empty rejections

This commit is contained in:
Luke Dashjr 2025-01-22 18:16:09 +00:00
parent a25c4629a8
commit a1df69392d
2 changed files with 2 additions and 2 deletions

View File

@ -263,7 +263,7 @@ bool IsWitnessStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs,
// witness stuffing detected
if (prevScript.IsPayToAnchor()) {
return false;
MaybeReject("anchor-not-empty");
}
bool p2sh = false;

View File

@ -405,7 +405,7 @@ class MempoolAcceptanceTest(BitcoinTestFramework):
anchor_nonempty_wit_spend.rehash()
self.check_mempool_result(
result_expected=[{'txid': anchor_nonempty_wit_spend.rehash(), 'allowed': False, 'reject-reason': 'bad-witness-nonstandard'}],
result_expected=[{'txid': anchor_nonempty_wit_spend.rehash(), 'allowed': False, 'reject-reason': 'bad-witness-anchor-not-empty'}],
rawtxs=[anchor_nonempty_wit_spend.serialize().hex()],
maxfeerate=0,
)