Changeset View
Changeset View
Standalone View
Standalone View
src/script/standard.h
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | bool operator!=(const BaseHash<HashType> &other) const noexcept { | ||||
return !(m_hash == other.m_hash); | return !(m_hash == other.m_hash); | ||||
} | } | ||||
bool operator<(const BaseHash<HashType> &other) const noexcept { | bool operator<(const BaseHash<HashType> &other) const noexcept { | ||||
return m_hash < other.m_hash; | return m_hash < other.m_hash; | ||||
} | } | ||||
size_t size() const { return m_hash.size(); } | size_t size() const { return m_hash.size(); } | ||||
uint8_t *data() { return m_hash.data(); } | |||||
const uint8_t *data() const { return m_hash.data(); } | |||||
}; | }; | ||||
/** A reference to a CScript: the Hash160 of its serialization (see script.h) */ | /** A reference to a CScript: the Hash160 of its serialization (see script.h) */ | ||||
class CScriptID : public BaseHash<uint160> { | class CScriptID : public BaseHash<uint160> { | ||||
public: | public: | ||||
CScriptID() : BaseHash() {} | CScriptID() : BaseHash() {} | ||||
explicit CScriptID(const CScript &in); | explicit CScriptID(const CScript &in); | ||||
explicit CScriptID(const uint160 &in) : BaseHash(in) {} | explicit CScriptID(const uint160 &in) : BaseHash(in) {} | ||||
▲ Show 20 Lines • Show All 122 Lines • Show Last 20 Lines |