Skip to content

Commit a1df693

Browse files
committed
Label and allow overriding bad-witness-anchor-not-empty rejections
1 parent a25c462 commit a1df693

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/policy/policy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ bool IsWitnessStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs,
263263

264264
// witness stuffing detected
265265
if (prevScript.IsPayToAnchor()) {
266-
return false;
266+
MaybeReject("anchor-not-empty");
267267
}
268268

269269
bool p2sh = false;

test/functional/mempool_accept.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ def run_test(self):
405405
anchor_nonempty_wit_spend.rehash()
406406

407407
self.check_mempool_result(
408-
result_expected=[{'txid': anchor_nonempty_wit_spend.rehash(), 'allowed': False, 'reject-reason': 'bad-witness-nonstandard'}],
408+
result_expected=[{'txid': anchor_nonempty_wit_spend.rehash(), 'allowed': False, 'reject-reason': 'bad-witness-anchor-not-empty'}],
409409
rawtxs=[anchor_nonempty_wit_spend.serialize().hex()],
410410
maxfeerate=0,
411411
)

0 commit comments

Comments
 (0)