Skip to content

Commit

Permalink
More frequent destinations check & backlog cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
SergiySW committed Sep 24, 2019
1 parent b6bf777 commit 72ab97f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nano/node/bootstrap/bootstrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,7 @@ void nano::bootstrap_attempt::lazy_clear ()
lazy_pulls.clear ();
lazy_state_backlog.clear ();
lazy_balances.clear ();
lazy_destinations.clear ();
}

void nano::bootstrap_attempt::lazy_run ()
Expand Down Expand Up @@ -683,6 +684,12 @@ void nano::bootstrap_attempt::lazy_run ()
{
lazy_pull_flush ();
}
// Start destinations check & backlog cleanup
if (iterations % 200 == 0 && pulls.empty ())
{
lazy_backlog_cleanup ();
lazy_destinations_flush ();
}
}
// Flushing lazy pulls
lazy_pull_flush ();
Expand Down

0 comments on commit 72ab97f

Please sign in to comment.