Skip to content

Commit f866957

Browse files
committed
Implement GetReservedDestination in DescriptorScriptPubKeyMan
1 parent a775f7c commit f866957

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/wallet/scriptpubkeyman.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1608,7 +1608,11 @@ bool DescriptorScriptPubKeyMan::Encrypt(const CKeyingMaterial& master_key, Walle
16081608

16091609
bool DescriptorScriptPubKeyMan::GetReservedDestination(const OutputType type, bool internal, CTxDestination& address, int64_t& index, CKeyPool& keypool)
16101610
{
1611-
return false;
1611+
LOCK(cs_desc_man);
1612+
std::string error;
1613+
bool result = GetNewDestination(type, address, error);
1614+
index = m_wallet_descriptor.next_index - 1;
1615+
return result;
16121616
}
16131617

16141618
void DescriptorScriptPubKeyMan::ReturnDestination(int64_t index, bool internal, const CTxDestination& addr)

0 commit comments

Comments
 (0)