From 3f373659d732a5b1e5fdc692a45b2b8179f66bec Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Mon, 7 Oct 2019 14:11:34 -0400 Subject: 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. --- src/wallet/scriptpubkeyman.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/wallet/scriptpubkeyman.cpp') diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp index 07920dec2e..4c9d88973e 100644 --- a/src/wallet/scriptpubkeyman.cpp +++ b/src/wallet/scriptpubkeyman.cpp @@ -469,9 +469,9 @@ int64_t LegacyScriptPubKeyMan::GetTimeFirstKey() const return nTimeFirstKey; } -const SigningProvider* LegacyScriptPubKeyMan::GetSigningProvider(const CScript& script) const +std::unique_ptr LegacyScriptPubKeyMan::GetSigningProvider(const CScript& script) const { - return this; + return MakeUnique(*this); } bool LegacyScriptPubKeyMan::CanProvide(const CScript& script, SignatureData& sigdata) -- cgit v1.2.3