Skip to content

Commit

Permalink
Implement SetType in DescriptorScriptPubKeyMan
Browse files Browse the repository at this point in the history
  • Loading branch information
achow101 committed Apr 23, 2020
1 parent 834de03 commit 78f8a92
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/wallet/scriptpubkeyman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1608,4 +1608,8 @@ uint256 DescriptorScriptPubKeyMan::GetID() const
return uint256();
}

void DescriptorScriptPubKeyMan::SetType(OutputType type, bool internal) {}
void DescriptorScriptPubKeyMan::SetType(OutputType type, bool internal)
{
this->m_address_type = type;
this->m_internal = internal;
}
7 changes: 7 additions & 0 deletions src/wallet/scriptpubkeyman.h
Original file line number Diff line number Diff line change
Expand Up @@ -490,11 +490,18 @@ class DescriptorScriptPubKeyMan : public ScriptPubKeyMan
using ScriptPubKeyMap = std::map<CScript, int32_t>; // Map of scripts to descriptor range index

ScriptPubKeyMap m_map_script_pub_keys GUARDED_BY(cs_desc_man);

OutputType m_address_type;
bool m_internal;
public:
DescriptorScriptPubKeyMan(WalletStorage& storage, WalletDescriptor& descriptor)
: ScriptPubKeyMan(storage),
m_wallet_descriptor(descriptor)
{}
DescriptorScriptPubKeyMan(WalletStorage& storage, OutputType address_type, bool internal)
: ScriptPubKeyMan(storage),
m_address_type(address_type), m_internal(internal)
{}

mutable RecursiveMutex cs_desc_man;

Expand Down

0 comments on commit 78f8a92

Please sign in to comment.