mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-03 17:54:19 +02:00
descriptors: add HavePrivateKeys()
Previously, to determine if a desc is watchonly, `ToPrivateString()`, was used. It returns `false` if there is at least one pubkey in the descriptor for which the provider does not have a private key. ToPrivateString() behaviour will change in the following commits to only return `false` if no priv keys could be found for the pub keys in the descriptor. HavePrivateKeys() is added here to replace the use of ToPrivateString() for determining if a descriptor is 'watchonly'. Co-authored-by: rkrux <rkrux.connect@gmail.com>
This commit is contained in:
@@ -26,6 +26,7 @@ public:
|
||||
bool IsRange() const override { return false; }
|
||||
bool IsSolvable() const override { return false; }
|
||||
bool IsSingleType() const override { return true; }
|
||||
bool HavePrivateKeys(const SigningProvider&) const override { return false; }
|
||||
bool ToPrivateString(const SigningProvider& provider, std::string& out) const override { return false; }
|
||||
bool ToNormalizedString(const SigningProvider& provider, std::string& out, const DescriptorCache* cache = nullptr) const override { return false; }
|
||||
bool Expand(int pos, const SigningProvider& provider, std::vector<CScript>& output_scripts, FlatSigningProvider& out, DescriptorCache* write_cache = nullptr) const override { return false; };
|
||||
|
||||
Reference in New Issue
Block a user