mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
partial (missing function GetKeyForDestination) Merge #11403: SegWit wallet support
This commit is contained in:
parent
7631118e04
commit
fa23a64471
@ -150,3 +150,13 @@ bool FillableSigningProvider::GetCScript(const CScriptID &hash, CScript& redeemS
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
CKeyID GetKeyForDestination(const SigningProvider& store, const CTxDestination& dest)
|
||||
{
|
||||
// Only supports destinations which map to single public keys, i.e. P2PKH
|
||||
const PKHash *pkhash = std::get_if<PKHash>(&dest);
|
||||
|
||||
if (pkhash != nullptr) return ToKeyID(*pkhash);
|
||||
|
||||
return CKeyID();
|
||||
}
|
||||
|
@ -131,4 +131,7 @@ public:
|
||||
virtual bool GetCScript(const CScriptID &hash, CScript& redeemScriptOut) const override;
|
||||
};
|
||||
|
||||
/** Return the CKeyID of the key involved in a script (if there is a unique one). */
|
||||
CKeyID GetKeyForDestination(const SigningProvider& store, const CTxDestination& dest);
|
||||
|
||||
#endif // BITCOIN_SCRIPT_SIGNINGPROVIDER_H
|
||||
|
Loading…
Reference in New Issue
Block a user