Page MenuHomePhabricator

Run background seeding periodically instead of unpredictably

Authored by Fabien on May 21 2020, 21:02.


* Instead of calling RandAddSeedSleep anytime the scheduler goes
  idle, call its replacement (RandAddSeedPeriodic) just once per
  minute. This has better guarantees of actually being run, and
  helps limit how frequently the dynamic env data is gathered.
* Since this code runs once per minute regardless now, we no
  longer need to keep track of the last time strengthening was
  run; just do it always.
* Make strengthening time context dependent (100 ms at startup,
  10 ms once per minute afterwards).

Partial backport of core PR17270:

Test Plan
ninja all check-all

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.May 21 2020, 21:02
Herald added a reviewer: Restricted Project. · View Herald TranscriptMay 21 2020, 21:02
Fabien requested review of this revision.May 21 2020, 21:02
teamcity edited the summary of this revision. (Show Details)May 21 2020, 21:02

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

deadalnix accepted this revision.May 21 2020, 21:18
This revision is now accepted and ready to land.May 21 2020, 21:18