mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-16 18:39:59 +01:00
desc spkm: Return SigningProvider only if we have the privkey
If we know about a pubkey that's in our descriptor, but we don't have the private key, don't return a SigningProvider for that pubkey. This is specifically an issue for Taproot outputs that use the H point as the resulting PSBTs may end up containing irrelevant information because the H point was detected as a pubkey each unrelated descriptor knew about.
This commit is contained in:
@@ -62,6 +62,11 @@ bool FlatSigningProvider::GetKeyOrigin(const CKeyID& keyid, KeyOriginInfo& info)
|
||||
if (ret) info = std::move(out.second);
|
||||
return ret;
|
||||
}
|
||||
bool FlatSigningProvider::HaveKey(const CKeyID &keyid) const
|
||||
{
|
||||
CKey key;
|
||||
return LookupHelper(keys, keyid, key);
|
||||
}
|
||||
bool FlatSigningProvider::GetKey(const CKeyID& keyid, CKey& key) const { return LookupHelper(keys, keyid, key); }
|
||||
bool FlatSigningProvider::GetTaprootSpendData(const XOnlyPubKey& output_key, TaprootSpendData& spenddata) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user