mirror of
https://github.com/monero-project/monero.git
synced 2025-08-23 11:25:08 -04:00
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)
This commit is contained in:
commit
9f5c7209a0
3 changed files with 16 additions and 6 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue