Skip to content

Commit

Permalink
Introduce SetType function to tell ScriptPubKeyMans the type and inte…
Browse files Browse the repository at this point in the history
…rnal-ness of it
  • Loading branch information
achow101 committed Apr 23, 2020
1 parent 6413980 commit 0662030
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/wallet/scriptpubkeyman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1497,3 +1497,5 @@ std::set<CKeyID> LegacyScriptPubKeyMan::GetKeys() const
}
return set_address;
}

void LegacyScriptPubKeyMan::SetType(OutputType type, bool internal) {}
4 changes: 4 additions & 0 deletions src/wallet/scriptpubkeyman.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ class ScriptPubKeyMan

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<typename... Params>
void WalletLogPrintf(std::string fmt, Params... parameters) const {
Expand Down Expand Up @@ -366,6 +368,8 @@ class LegacyScriptPubKeyMan : public ScriptPubKeyMan, public FillableSigningProv

uint256 GetID() const override;

void SetType(OutputType type, bool internal) override;

// Map from Key ID to key metadata.
std::map<CKeyID, CKeyMetadata> mapKeyMetadata GUARDED_BY(cs_KeyStore);

Expand Down

0 comments on commit 0662030

Please sign in to comment.