Page MenuHomePhabricator

[avalanche] Enforce cooldown request present in AvalancheResponse
ClosedPublic

Authored by deadalnix on Fri, Nov 23, 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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

deadalnix created this revision.Fri, Nov 23, 02:13
Herald added a reviewer: Restricted Project. · View Herald TranscriptFri, Nov 23, 02:13
Fabien added a subscriber: Fabien.Fri, Nov 23, 19:41
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.Fri, Nov 23, 22:22
schancel edited the summary of this revision. (Show Details)
deadalnix updated this revision to Diff 6074.Sat, Nov 24, 15:34

Fix typo

jasonbcox requested changes to this revision.Mon, Nov 26, 18:47
jasonbcox added a subscriber: jasonbcox.
jasonbcox added inline comments.
src/avalanche.cpp
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.Mon, Nov 26, 18:47
deadalnix requested review of this revision.Tue, Nov 27, 13:08
deadalnix marked an inline comment as done.

There is nothing actionable in that review.

src/avalanche.cpp
72 ↗(On Diff #6074)

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

Fabien accepted this revision as: Fabien.Tue, Nov 27, 13:48
jasonbcox accepted this revision.Tue, Nov 27, 18:05

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.Tue, Nov 27, 18:05
This revision was automatically updated to reflect the committed changes.