mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-05 02:05:10 +01:00
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();
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user