HomePhabricator

Use mockable time everywhere in net_processing

Description

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

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D9542

Details

Provenance
Pieter Wuille <pieter@wuille.net>Authored on Sep 27 2020, 21:43
FabienCommitted on May 18 2021, 13:29
FabienPushed on May 18 2021, 13:29
Reviewer
Restricted Project
Differential Revision
D9542: Use mockable time everywhere in net_processing
Parents
rABC066a92985e67: Bump version to 0.23.5
Branches
Unknown
Tags
Unknown