diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-08-21 10:55:34 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-08-28 21:30:36 +0100 |
commit | 45349b6f7c1eac32014f3051bf600fc96f6cf309 (patch) | |
tree | 1a0c5d2ccdd2eebc26e2de0f0f2fca51104e74d0 /src/wallet | |
parent | wallet: transfer_selected_rct now also selects fake outs (diff) | |
download | monero-45349b6f7c1eac32014f3051bf600fc96f6cf309.tar.xz |
wallet: do not ask for duplicate histograms
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/wallet2.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index df8e505f7..d80c746a4 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -2672,6 +2672,9 @@ void wallet2::get_outs(std::vector<std::vector<entry>> &outs, const std::list<tr req_t.method = "get_output_histogram"; for(auto it: selected_transfers) req_t.params.amounts.push_back(it->is_rct() ? 0 : it->amount()); + std::sort(req_t.params.amounts.begin(), req_t.params.amounts.end()); + auto end = std::unique(req_t.params.amounts.begin(), req_t.params.amounts.end()); + req_t.params.amounts.resize(std::distance(req_t.params.amounts.begin(), end)); req_t.params.unlocked = true; bool r = net_utils::invoke_http_json_remote_command2(m_daemon_address + "/json_rpc", req_t, resp_t, m_http_client); m_daemon_rpc_mutex.unlock(); |