diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2014-09-24 22:24:46 -0400 |
---|---|---|
committer | Cory Fields <cory-nospam-@coryfields.com> | 2014-10-17 13:44:14 -0400 |
commit | 066e2a1403fe306787a2ce0c8571aa9de57386cf (patch) | |
tree | 5a4257c467978f1260a0d69e937c16ba16a01773 /src/test/script_tests.cpp | |
parent | e8f6d54f1f58d9a5998e37367b84b427e51e1ad7 (diff) |
script: move CScriptID to standard.h and add a ctor for creating them from CScripts
This allows for a reversal of the current behavior.
This:
CScript foo;
CScriptID bar(foo.GetID());
Becomes:
CScript foo;
CScriptID bar(foo);
This way, CScript is no longer dependent on CScriptID or Hash();
Diffstat (limited to 'src/test/script_tests.cpp')
-rw-r--r-- | src/test/script_tests.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp index a4b0212494..cfb4fa6e7d 100644 --- a/src/test/script_tests.cpp +++ b/src/test/script_tests.cpp @@ -162,7 +162,7 @@ public: TestBuilder(const CScript& redeemScript, const std::string& comment_, int flags_, bool P2SH = false) : scriptPubKey(redeemScript), havePush(false), comment(comment_), flags(flags_) { if (P2SH) { - creditTx = BuildCreditingTransaction(CScript() << OP_HASH160 << redeemScript.GetID() << OP_EQUAL); + creditTx = BuildCreditingTransaction(CScript() << OP_HASH160 << CScriptID(redeemScript) << OP_EQUAL); } else { creditTx = BuildCreditingTransaction(redeemScript); } @@ -697,7 +697,7 @@ BOOST_AUTO_TEST_CASE(script_combineSigs) // P2SH, single-signature case: CScript pkSingle; pkSingle << keys[0].GetPubKey() << OP_CHECKSIG; keystore.AddCScript(pkSingle); - scriptPubKey = GetScriptForDestination(pkSingle.GetID()); + scriptPubKey = GetScriptForDestination(CScriptID(pkSingle)); SignSignature(keystore, txFrom, txTo, 0); combined = CombineSignatures(scriptPubKey, txTo, 0, scriptSig, empty); BOOST_CHECK(combined == scriptSig); |