From 8de302627ad9fc828b7bb83cec6ae42c3691d322 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Wed, 4 Apr 2018 11:40:31 +0100 Subject: [PATCH] wallet2: request transactions in slices when scanning for known rings This avoid massive memory consumption for huge wallets --- src/wallet/wallet2.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 77a7db086..b967b4f65 100755 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -5595,18 +5595,7 @@ bool wallet2::find_and_save_rings(bool force) for (const std::pair &entry: payments) { const crypto::hash &txid = entry.first; - req.txs_hashes.push_back(epee::string_tools::pod_to_hex(txid)); - } - - MDEBUG("Found " << std::to_string(req.txs_hashes.size()) << " transactions"); - - // get those transactions from the daemon - req.decode_as_json = false; - req.prune = true; - bool r; - { - const boost::lock_guard lock{m_daemon_rpc_mutex}; - r = epee::net_utils::invoke_http_json("/gettransactions", req, res, m_http_client, rpc_timeout); + txs_hashes.push_back(txid); } MDEBUG("Found " << std::to_string(txs_hashes.size()) << " transactions");