mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 15:04:44 +01:00
Implement IsMine for DescriptorScriptPubKeyMan
Adds a set of scriptPubKeys that DescriptorScriptPubKeyMan tracks. If the given script is in that set, it is considered ISMINE_SPENDABLE
This commit is contained in:
parent
db7177af8c
commit
2db7ca765c
1 changed files with 5 additions and 1 deletions
|
@ -1507,6 +1507,10 @@ bool DescriptorScriptPubKeyMan::GetNewDestination(const OutputType type, CTxDest
|
|||
|
||||
isminetype DescriptorScriptPubKeyMan::IsMine(const CScript& script) const
|
||||
{
|
||||
LOCK(cs_desc_man);
|
||||
if (m_map_script_pub_keys.count(script) > 0) {
|
||||
return ISMINE_SPENDABLE;
|
||||
}
|
||||
return ISMINE_NO;
|
||||
}
|
||||
|
||||
|
@ -1580,7 +1584,7 @@ std::unique_ptr<SigningProvider> DescriptorScriptPubKeyMan::GetSolvingProvider(c
|
|||
|
||||
bool DescriptorScriptPubKeyMan::CanProvide(const CScript& script, SignatureData& sigdata)
|
||||
{
|
||||
return false;
|
||||
return IsMine(script);
|
||||
}
|
||||
|
||||
bool DescriptorScriptPubKeyMan::SignTransaction(CMutableTransaction& tx, const std::map<COutPoint, Coin>& coins, int sighash, std::map<int, std::string>& input_errors) const
|
||||
|
|
Loading…
Add table
Reference in a new issue