diff options
author | João Barbosa <joao.paulo.barbosa@gmail.com> | 2019-11-02 16:20:45 +0000 |
---|---|---|
committer | João Barbosa <joao.paulo.barbosa@gmail.com> | 2019-11-02 21:36:21 +0000 |
commit | 0b75a7f0680d16a41043864a897470324917b1e8 (patch) | |
tree | 91e72e0079565a20b008083666f34152e150f412 /src/interfaces | |
parent | 01f45dd00eb032a19d142026e4d019944192da19 (diff) | |
download | bitcoin-0b75a7f0680d16a41043864a897470324917b1e8.tar.xz |
wallet: Reuse existing batch in CWallet::SetUsedDestinationState
Diffstat (limited to 'src/interfaces')
-rw-r--r-- | src/interfaces/wallet.cpp | 6 |
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 { |