Changeset View
Changeset View
Standalone View
Standalone View
src/script/standard.h
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | public: | ||||
friend bool operator==(const CNoDestination &a, const CNoDestination &b) { | friend bool operator==(const CNoDestination &a, const CNoDestination &b) { | ||||
return true; | return true; | ||||
} | } | ||||
friend bool operator<(const CNoDestination &a, const CNoDestination &b) { | friend bool operator<(const CNoDestination &a, const CNoDestination &b) { | ||||
return true; | return true; | ||||
} | } | ||||
}; | }; | ||||
struct PKHash : public uint160 { | |||||
PKHash() : uint160() {} | |||||
explicit PKHash(const uint160 &hash) : uint160(hash) {} | |||||
explicit PKHash(const CPubKey &pubkey); | |||||
using uint160::uint160; | |||||
}; | |||||
struct ScriptHash : public uint160 { | |||||
ScriptHash() : uint160() {} | |||||
explicit ScriptHash(const uint160 &hash) : uint160(hash) {} | |||||
explicit ScriptHash(const CScript &script); | |||||
using uint160::uint160; | |||||
}; | |||||
/** | /** | ||||
* A txout script template with a specific destination. It is either: | * A txout script template with a specific destination. It is either: | ||||
* * CNoDestination: no destination set | * * CNoDestination: no destination set | ||||
* * CKeyID: TX_PUBKEYHASH destination | * * PKHash: TX_PUBKEYHASH destination (P2PKH) | ||||
* * CScriptID: TX_SCRIPTHASH destination | * * ScriptHash: TX_SCRIPTHASH destination (P2SH) | ||||
* A CTxDestination is the internal data type encoded in a bitcoin address | * A CTxDestination is the internal data type encoded in a bitcoin address | ||||
*/ | */ | ||||
typedef boost::variant<CNoDestination, CKeyID, CScriptID> CTxDestination; | typedef boost::variant<CNoDestination, PKHash, ScriptHash> CTxDestination; | ||||
/** Check whether a CTxDestination is a CNoDestination. */ | /** Check whether a CTxDestination is a CNoDestination. */ | ||||
bool IsValidDestination(const CTxDestination &dest); | bool IsValidDestination(const CTxDestination &dest); | ||||
/** Get the name of a txnouttype as a C string, or nullptr if unknown. */ | /** Get the name of a txnouttype as a C string, or nullptr if unknown. */ | ||||
const char *GetTxnOutputType(txnouttype t); | const char *GetTxnOutputType(txnouttype t); | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines |