mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 23:29:12 +01:00
Refactor: Require scriptPubKey to get wallet SigningProvider
Easier to review ignoring whitespace:
git log -p -n1 -w
This commit does not change behavior. It passes new CScript arguments to
signing functions, but the arguments aren't currently used.
This commit is contained in:
@@ -117,8 +117,22 @@ public:
|
||||
std::string error;
|
||||
return m_wallet->GetNewDestination(type, label, dest, error);
|
||||
}
|
||||
bool getPubKey(const CKeyID& address, CPubKey& pub_key) override { return m_wallet->GetLegacyScriptPubKeyMan()->GetPubKey(address, pub_key); }
|
||||
bool getPrivKey(const CKeyID& address, CKey& key) override { return m_wallet->GetLegacyScriptPubKeyMan()->GetKey(address, key); }
|
||||
bool getPubKey(const CScript& script, const CKeyID& address, CPubKey& pub_key) override
|
||||
{
|
||||
const SigningProvider* provider = m_wallet->GetSigningProvider(script);
|
||||
if (provider) {
|
||||
return provider->GetPubKey(address, pub_key);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool getPrivKey(const CScript& script, const CKeyID& address, CKey& key) override
|
||||
{
|
||||
const SigningProvider* provider = m_wallet->GetSigningProvider(script);
|
||||
if (provider) {
|
||||
return provider->GetKey(address, key);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool isSpendable(const CTxDestination& dest) override { return m_wallet->IsMine(dest) & ISMINE_SPENDABLE; }
|
||||
bool haveWatchOnly() override
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user