Page MenuHomePhabricator

[tools] add PoissonNextSend method that returns mockable time
ClosedPublic

Authored by PiRK on Nov 3 2020, 14:18.

Details

Reviewers
majcosta
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rABC73791ff552e6: [tools] add PoissonNextSend method that returns mockable time
Summary

Introduce a Poisson helper method that wraps the existing method to return std::chrono::duration type, which is mockable.

This is a backport of Core PR17243

Test Plan

ninja && ninja check

Diff Detail

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

Event Timeline

Owners added a reviewer: Restricted Owners Package.Nov 3 2020, 14:18
PiRK requested review of this revision.Nov 3 2020, 14:18
majcosta added a subscriber: majcosta.
majcosta added inline comments.
src/net_processing.cpp
4343 ↗(On Diff #25392)

I'd keep the newline after this, makes a clean break from a time block and rest of the code, reads better imho

This revision is now accepted and ready to land.Nov 3 2020, 19:55

address feedback: added blank line like in the original PR