mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
Move CScriptID to script.{h/cpp}
CScriptID should be next to CScript just as CKeyID is next to CPubKey
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
#include <crypto/common.h>
|
||||
#include <prevector.h>
|
||||
#include <serialize.h>
|
||||
#include <uint256.h>
|
||||
#include <util/hash_type.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <climits>
|
||||
@@ -575,6 +577,15 @@ struct CScriptWitness
|
||||
std::string ToString() const;
|
||||
};
|
||||
|
||||
/** A reference to a CScript: the Hash160 of its serialization */
|
||||
class CScriptID : public BaseHash<uint160>
|
||||
{
|
||||
public:
|
||||
CScriptID() : BaseHash() {}
|
||||
explicit CScriptID(const CScript& in);
|
||||
explicit CScriptID(const uint160& in) : BaseHash(in) {}
|
||||
};
|
||||
|
||||
/** Test for OP_SUCCESSx opcodes as defined by BIP342. */
|
||||
bool IsOpSuccess(const opcodetype& opcode);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user