mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Define dust transaction outputs, and make them non-standard
This commit is contained in:
parent
b8e1dc2e53
commit
8de9bb53af
6 changed files with 74 additions and 27 deletions
|
|
@ -78,7 +78,9 @@ BOOST_AUTO_TEST_CASE(sign)
|
|||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
txFrom.vout[i].scriptPubKey = evalScripts[i];
|
||||
txFrom.vout[i].nValue = COIN;
|
||||
txFrom.vout[i+4].scriptPubKey = standardScripts[i];
|
||||
txFrom.vout[i+4].nValue = COIN;
|
||||
}
|
||||
BOOST_CHECK(txFrom.IsStandard());
|
||||
|
||||
|
|
@ -169,6 +171,7 @@ BOOST_AUTO_TEST_CASE(set)
|
|||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
txFrom.vout[i].scriptPubKey = outer[i];
|
||||
txFrom.vout[i].nValue = CENT;
|
||||
}
|
||||
BOOST_CHECK(txFrom.IsStandard());
|
||||
|
||||
|
|
@ -179,7 +182,7 @@ BOOST_AUTO_TEST_CASE(set)
|
|||
txTo[i].vout.resize(1);
|
||||
txTo[i].vin[0].prevout.n = i;
|
||||
txTo[i].vin[0].prevout.hash = txFrom.GetHash();
|
||||
txTo[i].vout[0].nValue = 1;
|
||||
txTo[i].vout[0].nValue = 1*CENT;
|
||||
txTo[i].vout[0].scriptPubKey = inner[i];
|
||||
BOOST_CHECK_MESSAGE(IsMine(keystore, txFrom.vout[i].scriptPubKey), strprintf("IsMine %d", i));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue