From aeeb7fb5cac101120545c308c61c77fba2ddb327 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 5fe9087f7..6b62a671f 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -3106,14 +3106,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; @@ -3130,7 +3134,7 @@ void wallet2::update_pool_state(std::vector