Skip to content

Commit c051026

Browse files
committed
wallet: add method for retrieving the end range for a ScriptPubKeyMan
1 parent 8452791 commit c051026

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/wallet/scriptpubkeyman.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2660,6 +2660,11 @@ const std::unordered_set<CScript, SaltedSipHasher> DescriptorScriptPubKeyMan::Ge
26602660
return script_pub_keys;
26612661
}
26622662

2663+
int32_t DescriptorScriptPubKeyMan::GetEndRange() const
2664+
{
2665+
return m_max_cached_index + 1;
2666+
}
2667+
26632668
bool DescriptorScriptPubKeyMan::GetDescriptorString(std::string& out, const bool priv) const
26642669
{
26652670
LOCK(cs_desc_man);

src/wallet/scriptpubkeyman.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,7 @@ class DescriptorScriptPubKeyMan : public ScriptPubKeyMan
644644
const WalletDescriptor GetWalletDescriptor() const EXCLUSIVE_LOCKS_REQUIRED(cs_desc_man);
645645
const std::unordered_set<CScript, SaltedSipHasher> GetScriptPubKeys() const override;
646646
const std::unordered_set<CScript, SaltedSipHasher> GetScriptPubKeys(int32_t minimum_index) const;
647+
int32_t GetEndRange() const;
647648

648649
bool GetDescriptorString(std::string& out, const bool priv) const;
649650

0 commit comments

Comments
 (0)