aboutsummaryrefslogtreecommitdiff
path: root/src/script/standard.h
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2014-09-24 22:24:46 -0400
committerCory Fields <cory-nospam-@coryfields.com>2014-10-17 13:44:14 -0400
commit066e2a1403fe306787a2ce0c8571aa9de57386cf (patch)
tree5a4257c467978f1260a0d69e937c16ba16a01773 /src/script/standard.h
parente8f6d54f1f58d9a5998e37367b84b427e51e1ad7 (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/script/standard.h')
-rw-r--r--src/script/standard.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/script/standard.h b/src/script/standard.h
index ead79b82a2..38d0b59885 100644
--- a/src/script/standard.h
+++ b/src/script/standard.h
@@ -13,6 +13,15 @@
class CScript;
+/** A reference to a CScript: the Hash160 of its serialization (see script.h) */
+class CScriptID : public uint160
+{
+public:
+ CScriptID() : uint160(0) {}
+ CScriptID(const CScript& in);
+ CScriptID(const uint160& in) : uint160(in) {}
+};
+
static const unsigned int MAX_OP_RETURN_RELAY = 40; // bytes
// Mandatory script verification flags that all new blocks must comply with for