Merge branch 'standardScriptSigs' of github.com:gavinandresen/bitcoin-git

This commit is contained in:
Gavin Andresen
2012-02-07 09:04:56 -05:00
5 changed files with 67 additions and 11 deletions

View File

@@ -300,6 +300,15 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
BOOST_CHECK(txTo.AreInputsStandard(mapInputs));
BOOST_CHECK_EQUAL(txTo.GetP2SHSigOpCount(mapInputs), 1);
// 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());