aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/scriptpubkeyman.h
diff options
context:
space:
mode:
authorfurszy <matiasfurszyfer@protonmail.com>2023-07-20 18:20:00 -0300
committerfurszy <matiasfurszyfer@protonmail.com>2023-11-21 23:01:30 -0300
commit075aa44ceba41fa82bb3ce2295e2962e5fd0508e (patch)
tree933399b754090b9dc6cd028c04f0a5891f85a7d9 /src/wallet/scriptpubkeyman.h
parentbb4554c81e0d819d74996f89cbb9c00476aedf8c (diff)
downloadbitcoin-075aa44ceba41fa82bb3ce2295e2962e5fd0508e.tar.xz
wallet: batch descriptor spkm TopUp
Instead of performing multiple atomic write operations per descriptor setup call, batch them all within a single atomic db txn.
Diffstat (limited to 'src/wallet/scriptpubkeyman.h')
-rw-r--r--src/wallet/scriptpubkeyman.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wallet/scriptpubkeyman.h b/src/wallet/scriptpubkeyman.h
index 7c0eca1475..7bdfbf0d34 100644
--- a/src/wallet/scriptpubkeyman.h
+++ b/src/wallet/scriptpubkeyman.h
@@ -583,7 +583,10 @@ private:
std::unique_ptr<FlatSigningProvider> GetSigningProvider(int32_t index, bool include_private = false) const EXCLUSIVE_LOCKS_REQUIRED(cs_desc_man);
protected:
- WalletDescriptor m_wallet_descriptor GUARDED_BY(cs_desc_man);
+ WalletDescriptor m_wallet_descriptor GUARDED_BY(cs_desc_man);
+
+ //! Same as 'TopUp' but designed for use within a batch transaction context
+ bool TopUpWithDB(WalletBatch& batch, unsigned int size = 0);
public:
DescriptorScriptPubKeyMan(WalletStorage& storage, WalletDescriptor& descriptor, int64_t keypool_size)