Merge b0222bbb49 into merged_master (Bitcoin PR bitcoin/bitcoin#30239)

This commit is contained in:
ivanlele 2026-04-03 08:45:56 +00:00
commit 744c517dac
No known key found for this signature in database
22 changed files with 1236 additions and 10 deletions

View file

@ -830,6 +830,11 @@ BOOST_AUTO_TEST_CASE(test_IsStandard)
// Check dust with default relay fee:
CAmount nDustThreshold = 182 * g_dust.GetFeePerK() / 1000;
BOOST_CHECK_EQUAL(nDustThreshold, 546);
// Add dust output to take dust slot, still standard!
t.vout.emplace_back(t.vout[0].nAsset, CConfidentialValue(0), t.vout[0].scriptPubKey);
CheckIsStandard(t);
// dust:
t.vout[0].nValue = nDustThreshold - 1;
CheckIsNotStandard(t, "dust");
@ -986,6 +991,10 @@ BOOST_AUTO_TEST_CASE(test_IsStandard)
CheckIsNotStandard(t, "bare-multisig");
g_bare_multi = DEFAULT_PERMIT_BAREMULTISIG;
// Add dust output to take dust slot
assert(t.vout.size() == 1);
t.vout.emplace_back(t.vout[0].nAsset, CConfidentialValue(0), t.vout[0].scriptPubKey);
// Check compressed P2PK outputs dust threshold (must have leading 02 or 03)
t.vout[0].scriptPubKey = CScript() << std::vector<unsigned char>(33, 0x02) << OP_CHECKSIG;
t.vout[0].nValue = 576;