mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
Merge b0222bbb49 into merged_master (Bitcoin PR bitcoin/bitcoin#30239)
This commit is contained in:
commit
744c517dac
22 changed files with 1236 additions and 10 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue