diff options
| author | Patrick Lodder <[email protected]> | 2016-02-21 16:49:03 +0100 |
|---|---|---|
| committer | Patrick Lodder <[email protected]> | 2016-02-21 16:49:03 +0100 |
| commit | f626f8f43672a940c7840577b007f3d0010c2179 (patch) | |
| tree | 283a89be14a8c0f9166ff05eafa86de1e4711808 /src/test/script_tests.cpp | |
| parent | Merge branch '1.8.3-dev' into 1.8-maint (diff) | |
| parent | Merge pull request #1309 from Sporklin/1.8.3-dev-Fixmanpagesports (diff) | |
| download | discoin-1.8-archive.tar.xz discoin-1.8-archive.zip | |
Merge branch '1.8.3-dev' into 1.8-maint1.8-archive
merges the actually released 1.8.3 into 1.8-maint
Diffstat (limited to 'src/test/script_tests.cpp')
| -rw-r--r-- | src/test/script_tests.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp index 29d518d70..0875f6129 100644 --- a/src/test/script_tests.cpp +++ b/src/test/script_tests.cpp @@ -144,8 +144,13 @@ BOOST_AUTO_TEST_CASE(script_valid) string scriptPubKeyString = test[1].get_str(); CScript scriptPubKey = ParseScript(scriptPubKeyString); + int flagsNow = flags; + if (test.size() > 3 && ("," + test[2].get_str() + ",").find(",DERSIG,") != string::npos) { + flagsNow |= SCRIPT_VERIFY_DERSIG; + } + CTransaction tx; - BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, tx, 0, flags, SIGHASH_NONE), strTest); + BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, tx, 0, flagsNow, SIGHASH_NONE), strTest); } } @@ -168,8 +173,13 @@ BOOST_AUTO_TEST_CASE(script_invalid) string scriptPubKeyString = test[1].get_str(); CScript scriptPubKey = ParseScript(scriptPubKeyString); + int flagsNow = flags; + if (test.size() > 3 && ("," + test[2].get_str() + ",").find(",DERSIG,") != string::npos) { + flagsNow |= SCRIPT_VERIFY_DERSIG; + } + CTransaction tx; - BOOST_CHECK_MESSAGE(!VerifyScript(scriptSig, scriptPubKey, tx, 0, flags, SIGHASH_NONE), strTest); + BOOST_CHECK_MESSAGE(!VerifyScript(scriptSig, scriptPubKey, tx, 0, flagsNow, SIGHASH_NONE), strTest); } } |