From 06620302c713cae65ee8e4ff9302e4c88e2a1285 Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Tue, 16 Jul 2019 13:34:35 -0400 Subject: [PATCH] Introduce SetType function to tell ScriptPubKeyMans the type and internal-ness of it --- src/wallet/scriptpubkeyman.cpp | 2 ++ src/wallet/scriptpubkeyman.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp index ec75f06e5e..f8f5740b38 100644 --- a/src/wallet/scriptpubkeyman.cpp +++ b/src/wallet/scriptpubkeyman.cpp @@ -1497,3 +1497,5 @@ std::set LegacyScriptPubKeyMan::GetKeys() const } return set_address; } + +void LegacyScriptPubKeyMan::SetType(OutputType type, bool internal) {} diff --git a/src/wallet/scriptpubkeyman.h b/src/wallet/scriptpubkeyman.h index 8512eadf31..0564d0cbc2 100644 --- a/src/wallet/scriptpubkeyman.h +++ b/src/wallet/scriptpubkeyman.h @@ -222,6 +222,8 @@ public: virtual uint256 GetID() const { return uint256(); } + virtual void SetType(OutputType type, bool internal) {} + /** Prepends the wallet name in logging output to ease debugging in multi-wallet use cases */ template void WalletLogPrintf(std::string fmt, Params... parameters) const { @@ -366,6 +368,8 @@ public: uint256 GetID() const override; + void SetType(OutputType type, bool internal) override; + // Map from Key ID to key metadata. std::map mapKeyMetadata GUARDED_BY(cs_KeyStore);