diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2012-02-07 09:04:56 -0500 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2012-02-07 09:04:56 -0500 |
commit | 0b452dff5e9f1401343b6c52ef739014d81fa8c6 (patch) | |
tree | e707c5982ee5f2a0a99b7e563c69d58414222eb7 /src/test/script_P2SH_tests.cpp | |
parent | 7bf8b7c25c944110dbe85ef9e4eebd858da34158 (diff) | |
parent | 39f0d9686095bce469dbfa52333331a5d15c6545 (diff) |
Merge branch 'standardScriptSigs' of github.com:gavinandresen/bitcoin-git
Diffstat (limited to 'src/test/script_P2SH_tests.cpp')
-rw-r--r-- | src/test/script_P2SH_tests.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp index c782e0c6c1..e3899113a3 100644 --- a/src/test/script_P2SH_tests.cpp +++ b/src/test/script_P2SH_tests.cpp @@ -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()); |