diff options
| author | Jeff Garzik <[email protected]> | 2012-10-20 10:56:04 -0700 |
|---|---|---|
| committer | Jeff Garzik <[email protected]> | 2012-10-20 10:56:04 -0700 |
| commit | dee0ee2ac9d6feb49eac9683c01a0eeed4389449 (patch) | |
| tree | 9eaf50e73a51a3b40da9cb557090a794138e9f35 /src/test/script_P2SH_tests.cpp | |
| parent | Revert "Merge pull request #1931 from laanwj/2012_10_newicons" (diff) | |
| parent | Check for canonical public keys and signatures (diff) | |
| download | discoin-dee0ee2ac9d6feb49eac9683c01a0eeed4389449.tar.xz discoin-dee0ee2ac9d6feb49eac9683c01a0eeed4389449.zip | |
Merge pull request #1742 from sipa/canonical
Check for canonical public keys and signatures
Diffstat (limited to 'src/test/script_P2SH_tests.cpp')
| -rw-r--r-- | src/test/script_P2SH_tests.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp index eabfcd030..9db584c14 100644 --- a/src/test/script_P2SH_tests.cpp +++ b/src/test/script_P2SH_tests.cpp @@ -14,7 +14,7 @@ using namespace std; // Test routines internal to script.cpp: extern uint256 SignatureHash(CScript scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType); extern bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, - bool fValidatePayToScriptHash, int nHashType); + bool fValidatePayToScriptHash, bool fStrictEncodings, int nHashType); // Helpers: static std::vector<unsigned char> @@ -40,7 +40,7 @@ Verify(const CScript& scriptSig, const CScript& scriptPubKey, bool fStrict) txTo.vin[0].scriptSig = scriptSig; txTo.vout[0].nValue = 1; - return VerifyScript(scriptSig, scriptPubKey, txTo, 0, fStrict, 0); + return VerifyScript(scriptSig, scriptPubKey, txTo, 0, fStrict, true, 0); } @@ -105,7 +105,7 @@ BOOST_AUTO_TEST_CASE(sign) { CScript sigSave = txTo[i].vin[0].scriptSig; txTo[i].vin[0].scriptSig = txTo[j].vin[0].scriptSig; - bool sigOK = VerifySignature(txFrom, txTo[i], 0, true, 0); + bool sigOK = VerifySignature(txFrom, txTo[i], 0, true, true, 0); if (i == j) BOOST_CHECK_MESSAGE(sigOK, strprintf("VerifySignature %d %d", i, j)); else |