mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Make transactions with extra data in their scriptSig's non-standard.
This commit is contained in:
parent
43cda5f325
commit
39f0d96860
5 changed files with 67 additions and 11 deletions
|
|
@ -293,6 +293,15 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
|
|||
|
||||
BOOST_CHECK(txTo.AreInputsStandard(mapInputs));
|
||||
|
||||
// Make sure adding crap to the scriptSigs makes them non-standard:
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
CScript t = txTo.vin[i].scriptSig;
|
||||
txTo.vin[i].scriptSig = (CScript() << 11) + t;
|
||||
BOOST_CHECK(!txTo.AreInputsStandard(mapInputs));
|
||||
txTo.vin[i].scriptSig = t;
|
||||
}
|
||||
|
||||
CTransaction txToNonStd;
|
||||
txToNonStd.vout.resize(1);
|
||||
txToNonStd.vout[0].scriptPubKey.SetBitcoinAddress(key[1].GetPubKey());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue