aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2022-10-28 00:44:59 -0400
committerluigi1111 <luigi1111w@gmail.com>2022-10-28 00:44:59 -0400
commit9f5c7209a0a9c4ed3b8a0c00dda9dc885f400fed (patch)
tree6e83b35a65e1c5d36cc7c4bcaeea0a11d7d6a24b /src/wallet/wallet2.cpp
parentMerge pull request #8319 (diff)
parentwallet_rpc_server: chunk refresh to keep responding to RPC while refreshing (diff)
downloadmonero-9f5c7209a0a9c4ed3b8a0c00dda9dc885f400fed.tar.xz
Merge pull request #8355
23fde15 wallet_rpc_server: chunk refresh to keep responding to RPC while refreshing (moneromooo-monero) 5bb2369 wallet_rpc_server: add --no-initial-sync flag for quicker network binding (moneromooo-monero)
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r--src/wallet/wallet2.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 1c9a048c1..a1a51f7de 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -3418,7 +3418,7 @@ std::shared_ptr<std::map<std::pair<uint64_t, uint64_t>, size_t>> wallet2::create
return cache;
}
//----------------------------------------------------------------------------------------------------
-void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blocks_fetched, bool& received_money, bool check_pool)
+void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blocks_fetched, bool& received_money, bool check_pool, uint64_t max_blocks)
{
if (m_offline)
{
@@ -3514,7 +3514,7 @@ void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blo
update_pool_state(process_pool_txs, true);
bool first = true, last = false;
- while(m_run.load(std::memory_order_relaxed))
+ while(m_run.load(std::memory_order_relaxed) && blocks_fetched < max_blocks)
{
uint64_t next_blocks_start_height;
std::vector<cryptonote::block_complete_entry> next_blocks;