aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorJoão Barbosa <joao.paulo.barbosa@gmail.com>2019-11-02 16:20:45 +0000
committerJoão Barbosa <joao.paulo.barbosa@gmail.com>2019-11-02 21:36:21 +0000
commit0b75a7f0680d16a41043864a897470324917b1e8 (patch)
tree91e72e0079565a20b008083666f34152e150f412 /src/interfaces
parent01f45dd00eb032a19d142026e4d019944192da19 (diff)
downloadbitcoin-0b75a7f0680d16a41043864a897470324917b1e8.tar.xz
wallet: Reuse existing batch in CWallet::SetUsedDestinationState
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/wallet.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/interfaces/wallet.cpp b/src/interfaces/wallet.cpp
index b6ede08b14..3e6bb16c4f 100644
--- a/src/interfaces/wallet.cpp
+++ b/src/interfaces/wallet.cpp
@@ -170,12 +170,14 @@ public:
bool addDestData(const CTxDestination& dest, const std::string& key, const std::string& value) override
{
LOCK(m_wallet->cs_wallet);
- return m_wallet->AddDestData(dest, key, value);
+ WalletBatch batch{m_wallet->GetDatabase()};
+ return m_wallet->AddDestData(batch, dest, key, value);
}
bool eraseDestData(const CTxDestination& dest, const std::string& key) override
{
LOCK(m_wallet->cs_wallet);
- return m_wallet->EraseDestData(dest, key);
+ WalletBatch batch{m_wallet->GetDatabase()};
+ return m_wallet->EraseDestData(batch, dest, key);
}
std::vector<std::string> getDestValues(const std::string& prefix) override
{