Page MenuHomePhabricator

[avalanche] Detect when more nodes are needed
ClosedPublic

Authored by Fabien on Feb 10 2022, 15:08.

Details

Reviewers
tyler-smith
Group Reviewers
Restricted Project
Maniphest Tasks
Restricted Maniphest Task
Commits
rABC368e00738f7d: [avalanche] Detect when more nodes are needed
Summary

If the peer manager fails to find an available node during a call to selectNode(), it will latch a flag that can be used to trigger requesting more avalanche node addresses. The latch is atomic and cleared on read so we can loop over it in a network thread (out of scope for this diff).

Ref T1696.

Test Plan
ninja check-avalanche

Diff Detail

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

Event Timeline

Fabien requested review of this revision.Feb 10 2022, 15:08
src/avalanche/peermanager.h
207 ↗(On Diff #32334)

Note to reviewers: I'm not happy with this name because it doesn't reflect the fact that the status is cleared, but I didn't find a good one. Any suggestion is welcome.

tyler-smith added a subscriber: tyler-smith.

The actual change is straightforward and correct. All impacted logic branches appear to be tested.

This revision is now accepted and ready to land.Feb 15 2022, 20:48