Skip to content

Commit 78f8a92

Browse files
committed
Implement SetType in DescriptorScriptPubKeyMan
1 parent 834de03 commit 78f8a92

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/wallet/scriptpubkeyman.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1608,4 +1608,8 @@ uint256 DescriptorScriptPubKeyMan::GetID() const
16081608
return uint256();
16091609
}
16101610

1611-
void DescriptorScriptPubKeyMan::SetType(OutputType type, bool internal) {}
1611+
void DescriptorScriptPubKeyMan::SetType(OutputType type, bool internal)
1612+
{
1613+
this->m_address_type = type;
1614+
this->m_internal = internal;
1615+
}

src/wallet/scriptpubkeyman.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,11 +490,18 @@ class DescriptorScriptPubKeyMan : public ScriptPubKeyMan
490490
using ScriptPubKeyMap = std::map<CScript, int32_t>; // Map of scripts to descriptor range index
491491

492492
ScriptPubKeyMap m_map_script_pub_keys GUARDED_BY(cs_desc_man);
493+
494+
OutputType m_address_type;
495+
bool m_internal;
493496
public:
494497
DescriptorScriptPubKeyMan(WalletStorage& storage, WalletDescriptor& descriptor)
495498
: ScriptPubKeyMan(storage),
496499
m_wallet_descriptor(descriptor)
497500
{}
501+
DescriptorScriptPubKeyMan(WalletStorage& storage, OutputType address_type, bool internal)
502+
: ScriptPubKeyMan(storage),
503+
m_address_type(address_type), m_internal(internal)
504+
{}
498505

499506
mutable RecursiveMutex cs_desc_man;
500507

0 commit comments

Comments
 (0)