From 04c0da29869ceccbc51d3237404fcf9639a5444a Mon Sep 17 00:00:00 2001 From: tobtoht Date: Mon, 27 Jun 2022 21:23:12 +0200 Subject: [PATCH] Chunk /gettransactions to avoid hitting restricted RPC limit --- src/wallet/wallet2.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 0b2a6c0f5..186f8d260 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -3159,14 +3159,18 @@ void wallet2::update_pool_state(std::vector(SLICE_SIZE, txids.size() - offset); + for (size_t n = offset; n < (offset + n_txids); ++n) { + req.txs_hashes.push_back(epee::string_tools::pod_to_hex(txids.at(n).first)); + } + MDEBUG("asking for " << req.txs_hashes.size() << " transactions"); req.decode_as_json = false; req.prune = true; @@ -3183,7 +3187,7 @@ void wallet2::update_pool_state(std::vector