From a668fd1af3098330a0a4d583d3f6f517a05d5d90 Mon Sep 17 00:00:00 2001 From: woodser Date: Tue, 20 Aug 2019 07:51:30 -0400 Subject: [PATCH] make_sweep_account private function; sweep_unlocked returns vector --- src/wallet/monero_wallet.cpp | 4 ++-- src/wallet/monero_wallet.h | 11 ++--------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/wallet/monero_wallet.cpp b/src/wallet/monero_wallet.cpp index 34f6b3e..e356456 100644 --- a/src/wallet/monero_wallet.cpp +++ b/src/wallet/monero_wallet.cpp @@ -1977,7 +1977,7 @@ namespace monero { return tx_set; } - monero_tx_set monero_wallet::sweep_unlocked(const monero_send_request& request) { + vector monero_wallet::sweep_unlocked(const monero_send_request& request) { throw runtime_error("sweep_unlocked not implemented"); } @@ -1987,7 +1987,7 @@ namespace monero { if (request.m_account_index == boost::none) throw runtime_error("Must specify account index to sweep from"); if (request.m_destinations.size() != 1 || request.m_destinations[0]->m_address == boost::none || request.m_destinations[0]->m_address.get().empty()) throw runtime_error("Must provide exactly one destination address to sweep output to"); if (request.m_destinations[0]->m_amount != boost::none) throw runtime_error("Cannot specify destination amount to sweep"); - if (request.m_key_image != boost::none) throw runtime_error("Key image defined; use sweep_output() to sweep an output by its key image"); + if (request.m_key_image != boost::none) throw runtime_error("Cannot define key image in sweep_account(); use sweep_output() to sweep an output by its key image"); if (request.m_sweep_each_subaddress != boost::none && request.m_sweep_each_subaddress.get() == true) throw runtime_error("Cannot sweep each subaddress individually with sweep_account"); // validate the transfer requested and populate dsts & extra diff --git a/src/wallet/monero_wallet.h b/src/wallet/monero_wallet.h index d2038c0..2af2e84 100644 --- a/src/wallet/monero_wallet.h +++ b/src/wallet/monero_wallet.h @@ -918,15 +918,7 @@ namespace monero { * @param request is the sweep configuration * @return the tx sets with the requested transactions */ - monero_tx_set sweep_unlocked(const monero_send_request& request); - - /** - * Sweep unlocked funds within an account. - * - * @param request configures the sweep request - * @return the resulting set of txs - */ - monero_tx_set sweep_account(const monero_send_request& request); + vector sweep_unlocked(const monero_send_request& request); /** * Sweep an output with a given key image. @@ -1403,6 +1395,7 @@ namespace monero { void init_common(); vector get_subaddresses_aux(uint32_t account_idx, const vector& subaddress_indices, const vector& transfers) const; + monero_tx_set sweep_account(const monero_send_request& request); // sweeps unlocked funds within an account; private helper to sweep_unlocked() // blockchain sync management mutable std::atomic m_is_synced; // whether or not wallet is synced