Page MenuHomePhabricator

[avalanche] Enforce cooldown request present in AvalancheResponse

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



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

rABC Bitcoin ABC
Lint Not Applicable
Tests Not Applicable

Event Timeline

Fabien added inline comments.
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.
72 ↗(On Diff #6074)

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.

72 ↗(On Diff #6074)

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.