From 8a5583131ce78cd748e2279eb9331321e4ef2aa3 Mon Sep 17 00:00:00 2001 From: furszy Date: Fri, 19 Aug 2022 22:31:49 -0300 Subject: [PATCH] wallet: remove unused methods CWallet::DummySignTx, OutputGroupTypeMap::find --- src/wallet/coinselection.cpp | 7 ------- src/wallet/coinselection.h | 2 -- src/wallet/wallet.h | 6 ------ 3 files changed, 15 deletions(-) diff --git a/src/wallet/coinselection.cpp b/src/wallet/coinselection.cpp index 3fd0280b8b..9cf61dbe51 100644 --- a/src/wallet/coinselection.cpp +++ b/src/wallet/coinselection.cpp @@ -387,13 +387,6 @@ void OutputGroupTypeMap::Push(const OutputGroup& group, OutputType type, bool in } } -std::optional OutputGroupTypeMap::Find(OutputType type) -{ - auto it_by_type = groups_by_type.find(type); - if (it_by_type == groups_by_type.end()) return std::nullopt; - return it_by_type->second; -} - CAmount GetSelectionWaste(const std::set>& inputs, CAmount change_cost, CAmount target, bool use_effective_value) { // This function should not be called with empty inputs as that would mean the selection failed diff --git a/src/wallet/coinselection.h b/src/wallet/coinselection.h index cd03b7d224..dbe01a08fe 100644 --- a/src/wallet/coinselection.h +++ b/src/wallet/coinselection.h @@ -263,8 +263,6 @@ struct OutputGroupTypeMap // Based on the insert flag; appends group to the 'mixed_group' and, if value > 0, to the 'positive_group'. // This affects both; the groups filtered by type and the overall groups container. void Push(const OutputGroup& group, OutputType type, bool insert_positive, bool insert_mixed); - // Retrieves 'Groups' filtered by type - std::optional Find(OutputType type); // Different output types count size_t TypesCount() { return groups_by_type.size(); } }; diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 16eee1e050..e8c18dbb67 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -592,12 +592,6 @@ public: bool SubmitTxMemoryPoolAndRelay(CWalletTx& wtx, std::string& err_string, bool relay) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); - bool DummySignTx(CMutableTransaction &txNew, const std::set &txouts, const CCoinControl* coin_control = nullptr) const - { - std::vector v_txouts(txouts.size()); - std::copy(txouts.begin(), txouts.end(), v_txouts.begin()); - return DummySignTx(txNew, v_txouts, coin_control); - } bool DummySignTx(CMutableTransaction &txNew, const std::vector &txouts, const CCoinControl* coin_control = nullptr) const; bool ImportScripts(const std::set scripts, int64_t timestamp) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);