Introduce SetType function to tell ScriptPubKeyMans the type and internal-ness of it

This commit is contained in:
Andrew Chow
2019-07-16 13:34:35 -04:00
parent 64139803f1
commit 06620302c7
2 changed files with 6 additions and 0 deletions

View File

@@ -1497,3 +1497,5 @@ std::set<CKeyID> LegacyScriptPubKeyMan::GetKeys() const
} }
return set_address; return set_address;
} }
void LegacyScriptPubKeyMan::SetType(OutputType type, bool internal) {}

View File

@@ -222,6 +222,8 @@ public:
virtual uint256 GetID() const { return uint256(); } 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 */ /** Prepends the wallet name in logging output to ease debugging in multi-wallet use cases */
template<typename... Params> template<typename... Params>
void WalletLogPrintf(std::string fmt, Params... parameters) const { void WalletLogPrintf(std::string fmt, Params... parameters) const {
@@ -366,6 +368,8 @@ public:
uint256 GetID() const override; uint256 GetID() const override;
void SetType(OutputType type, bool internal) override;
// Map from Key ID to key metadata. // Map from Key ID to key metadata.
std::map<CKeyID, CKeyMetadata> mapKeyMetadata GUARDED_BY(cs_KeyStore); std::map<CKeyID, CKeyMetadata> mapKeyMetadata GUARDED_BY(cs_KeyStore);