mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-05 10:12:48 +01:00
Move CTxDestination from script/script to script/standard
This commit is contained in:
@@ -45,6 +45,20 @@ enum txnouttype
|
||||
TX_NULL_DATA,
|
||||
};
|
||||
|
||||
class CNoDestination {
|
||||
public:
|
||||
friend bool operator==(const CNoDestination &a, const CNoDestination &b) { return true; }
|
||||
friend bool operator<(const CNoDestination &a, const CNoDestination &b) { return true; }
|
||||
};
|
||||
|
||||
/** A txout script template with a specific destination. It is either:
|
||||
* * CNoDestination: no destination set
|
||||
* * CKeyID: TX_PUBKEYHASH destination
|
||||
* * CScriptID: TX_SCRIPTHASH destination
|
||||
* A CTxDestination is the internal data type encoded in a CBitcoinAddress
|
||||
*/
|
||||
typedef boost::variant<CNoDestination, CKeyID, CScriptID> CTxDestination;
|
||||
|
||||
const char* GetTxnOutputType(txnouttype t);
|
||||
|
||||
bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<std::vector<unsigned char> >& vSolutionsRet);
|
||||
@@ -53,4 +67,7 @@ bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType);
|
||||
bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet);
|
||||
bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<CTxDestination>& addressRet, int& nRequiredRet);
|
||||
|
||||
CScript GetScriptForDestination(const CTxDestination& dest);
|
||||
CScript GetScriptForMultisig(int nRequired, const std::vector<CPubKey>& keys);
|
||||
|
||||
#endif // H_BITCOIN_SCRIPT_STANDARD
|
||||
|
||||
Reference in New Issue
Block a user