HomePhabricator

[avalanche] Request for more avalanche nodes when needed

Description

[avalanche] Request for more avalanche nodes when needed

Summary:
This diff spins a new network scheduler task that checks every 5 to 10 minutes whether it is required to request more avalanche nodes, and takes action accordingly.

Since it's running in the scheduler thread, the Peer::m_addr_token_bucket attribute needs to be guarded by a lock. Due to the way it is used, an atomic is not the best option here so a Mutex is used.

Ref T1696.

Depends on D11020, D11033 and D11034.

Test Plan:
With Clang and Debug enabled:

ninja all check-all

Reviewers: #bitcoin_abc, tyler-smith

Reviewed By: #bitcoin_abc, tyler-smith

Subscribers: tyler-smith

Maniphest Tasks: T1696

Differential Revision: https://reviews.bitcoinabc.org/D11035

Details

Provenance
FabienAuthored on Feb 16 2022, 10:15
FabienPushed on Feb 17 2022, 10:43
Reviewer
Restricted Project
Differential Revision
D11035: [avalanche] Request for more avalanche nodes when needed
Parents
rABC368e00738f7d: [avalanche] Detect when more nodes are needed
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task