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/keystore.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/keystore.cpp')
-rw-r--r-- | src/keystore.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/keystore.cpp b/src/keystore.cpp index 755defa26d..039c690625 100644 --- a/src/keystore.cpp +++ b/src/keystore.cpp @@ -8,6 +8,7 @@ #include "crypter.h" #include "key.h" #include "script/script.h" +#include "script/standard.h" #include "util.h" #include <boost/foreach.hpp> @@ -38,7 +39,7 @@ bool CBasicKeyStore::AddCScript(const CScript& redeemScript) return error("CBasicKeyStore::AddCScript() : redeemScripts > %i bytes are invalid", MAX_SCRIPT_ELEMENT_SIZE); LOCK(cs_KeyStore); - mapScripts[redeemScript.GetID()] = redeemScript; + mapScripts[CScriptID(redeemScript)] = redeemScript; return true; } |