Page MenuHomePhabricator

net: Use mockable time for ping/pong, add tests
ClosedPublic

Authored by Fabien on Feb 2 2021, 13:15.

Details

Reviewers
majcosta
Group Reviewers
Restricted Project
Commits
rABC0f688cf6874d: net: Use mockable time for ping/pong, add tests
Summary
Switch CNode::m_ping_start and CNetMessage::m_time to mockable time, so
that tests can be added.

Mockable time is also type-safe, since it uses std::chrono

Backport of core PR18638.

Test Plan
ninja all check-all

Diff Detail

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