Page MenuHomePhabricator

Use mockable time everywhere in net_processing
ClosedPublic

Authored by Fabien on May 18 2021, 10:10.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABC6f09bb224dc6: Use mockable time everywhere in net_processing
Summary
The fact that net_processing uses a mix of mockable tand non-mockable
time functions made it hard to write functional tests for #19988.

I'm opening this as a separate PR as I believe it's independently
useful. In some ways this doesn't go quite as far as it could, as there
are now several data structures that could be converted to std::chrono
types as well now. I haven't done that here, but I'm happy to reconsider
that.

Backport of core#20027.

Test Plan
ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable