mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-03 09:43:55 +02:00
Allow CNoDestination to represent a raw script
Even if a script is not a standard destination type, it can still be useful to have a CTxDestination that stores the script.
This commit is contained in:
@@ -93,6 +93,7 @@ bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet)
|
||||
case TxoutType::MULTISIG:
|
||||
case TxoutType::NULL_DATA:
|
||||
case TxoutType::NONSTANDARD:
|
||||
addressRet = CNoDestination(scriptPubKey);
|
||||
return false;
|
||||
} // no default case, so the compiler can warn about missing cases
|
||||
assert(false);
|
||||
@@ -104,7 +105,7 @@ class CScriptVisitor
|
||||
public:
|
||||
CScript operator()(const CNoDestination& dest) const
|
||||
{
|
||||
return CScript();
|
||||
return dest.GetScript();
|
||||
}
|
||||
|
||||
CScript operator()(const PKHash& keyID) const
|
||||
|
||||
Reference in New Issue
Block a user