mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-20 16:48:40 +02:00
make_sweep_account private function;
sweep_unlocked returns vector<monero_tx_set>
This commit is contained in:
@@ -1977,7 +1977,7 @@ namespace monero {
|
||||
return tx_set;
|
||||
}
|
||||
|
||||
monero_tx_set monero_wallet::sweep_unlocked(const monero_send_request& request) {
|
||||
vector<monero_tx_set> 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
|
||||
|
||||
@@ -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<monero_tx_set> 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<monero_subaddress> get_subaddresses_aux(uint32_t account_idx, const vector<uint32_t>& subaddress_indices, const vector<tools::wallet2::transfer_details>& 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<bool> m_is_synced; // whether or not wallet is synced
|
||||
|
||||
Reference in New Issue
Block a user