diff options
| author | Gavin Andresen <[email protected]> | 2012-02-07 09:04:56 -0500 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2012-02-07 09:04:56 -0500 |
| commit | 0b452dff5e9f1401343b6c52ef739014d81fa8c6 (patch) | |
| tree | e707c5982ee5f2a0a99b7e563c69d58414222eb7 /src/test/script_P2SH_tests.cpp | |
| parent | -bip16 option (default: 1) to support / not support BIP 16. And bumped defaul... (diff) | |
| parent | Make transactions with extra data in their scriptSig's non-standard. (diff) | |
| download | discoin-0b452dff5e9f1401343b6c52ef739014d81fa8c6.tar.xz discoin-0b452dff5e9f1401343b6c52ef739014d81fa8c6.zip | |
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 c782e0c6c..e3899113a 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()); |