From b608a6af4876f4693c76f8937b8293345fc666c4 Mon Sep 17 00:00:00 2001 From: Kris Nuttycombe Date: Tue, 5 Oct 2021 16:31:37 -0600 Subject: [PATCH] Remove unused `AddDestData` method. --- src/wallet/wallet.cpp | 12 ------------ src/wallet/wallet.h | 2 -- 2 files changed, 14 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 7d26262c4..c15002670 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -4650,18 +4650,6 @@ void CWallet::GetKeyBirthTimes(std::map &mapKeyBirth) const { } } -bool CWallet::AddDestData(const CTxDestination &dest, const std::string &key, const std::string &value) -{ - if (std::get_if(&dest)) - return false; - - mapAddressBook[dest].destdata.insert(std::make_pair(key, value)); - if (!fFileBacked) - return true; - KeyIO keyIO(Params()); - return CWalletDB(strWalletFile).WriteDestData(keyIO.EncodeDestination(dest), key, value); -} - bool CWallet::EraseDestData(const CTxDestination &dest, const std::string &key) { if (!mapAddressBook[dest].destdata.erase(key)) diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 1bd9f1682..79566bc41 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -1005,8 +1005,6 @@ public: bool AddCScript(const CScript& redeemScript); bool LoadCScript(const CScript& redeemScript); - //! Adds a destination data tuple to the store, and saves it to disk - bool AddDestData(const CTxDestination &dest, const std::string &key, const std::string &value); //! Erases a destination data tuple in the store and on disk bool EraseDestData(const CTxDestination &dest, const std::string &key); //! Adds a destination data tuple to the store, without saving it to disk