mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-29 00:08:25 +02:00
Refactor: Replace SigningProvider pointers with unique_ptrs
Needed for future ScriptPubKeyMans which may need to create SigningProviders dynamically and thus a normal pointer is not enough This commit does not change behavior.
This commit is contained in:
@@ -119,7 +119,7 @@ public:
|
||||
}
|
||||
bool getPubKey(const CScript& script, const CKeyID& address, CPubKey& pub_key) override
|
||||
{
|
||||
const SigningProvider* provider = m_wallet->GetSigningProvider(script);
|
||||
std::unique_ptr<SigningProvider> provider = m_wallet->GetSigningProvider(script);
|
||||
if (provider) {
|
||||
return provider->GetPubKey(address, pub_key);
|
||||
}
|
||||
@@ -127,7 +127,7 @@ public:
|
||||
}
|
||||
bool getPrivKey(const CScript& script, const CKeyID& address, CKey& key) override
|
||||
{
|
||||
const SigningProvider* provider = m_wallet->GetSigningProvider(script);
|
||||
std::unique_ptr<SigningProvider> provider = m_wallet->GetSigningProvider(script);
|
||||
if (provider) {
|
||||
return provider->GetKey(address, key);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user