Page MenuHomePhabricator

[avalanche] Enforce cooldown request present in AvalancheResponse
ClosedPublic

Authored by deadalnix on Nov 23 2018, 02:13.

Details

Summary

It is important in order to ensure the health of the network that node are able to throttle the requests they get from peers. This makes sure the core mechanics respect these cooldown requests.

Depends on D2117

Test Plan

Added tests case.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
nodecooldown
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 4098
Build 6267: Bitcoin ABC Buildbot (legacy)
Build 6266: arc lint + arc unit

Event Timeline

Fabien added inline comments.
src/avalanche.cpp
274 ↗(On Diff #6048)

needa => need a

schancel retitled this revision from [avalanche] Ensfore cooldown request present in AvalancheResponse to [avalanche] Enforce cooldown request present in AvalancheResponse.Nov 23 2018, 22:22
schancel edited the summary of this revision. (Show Details)
jasonbcox requested changes to this revision.Nov 26 2018, 18:47
jasonbcox added a subscriber: jasonbcox.
jasonbcox added inline comments.
src/avalanche.cpp
72

Is there a reason we're departing from GetTime() / GetTimeMillis() / GetTimeMicros()? If chrono is strictly better, then we should begin migrating away from the current GetTime implementation (in separate diffs, obviously).

This revision now requires changes to proceed.Nov 26 2018, 18:47
deadalnix marked an inline comment as done.

There is nothing actionable in that review.

src/avalanche.cpp
72

These times can be mocked. They use an ancestor of chrono from boost under the hood.

There is nothing actionable in that review.

There is. Answering my question is (imo) critical to getting this code reviewed.

This revision is now accepted and ready to land.Nov 27 2018, 18:05
This revision was automatically updated to reflect the committed changes.