Page MenuHomePhabricator

[avalanche] Don't fallback too quickly to regular outbound when looking for an avalanche one
ClosedPublic

Authored by Fabien on Apr 7 2022, 11:25.

Details

Reviewers
tyler-smith
Group Reviewers
Restricted Project
Maniphest Tasks
Restricted Maniphest Task
Commits
rABC0426d890c236: [avalanche] Don't fallback too quickly to regular outbound when looking for an…
Summary

The outbound connection thread is prioritizing the avalanche outbounds, however it falls back to regular outbound if the address has no avalanche service bit set. This diff makes the outbound lookup a bit more perseverant by waiting for 50 retries before falling back. There is no change in behavior under normal conditions.

Ref T1696.

Test Plan
./test/functional/test_runner.py p2p_add_connections

Diff Detail

Repository
rABC Bitcoin ABC
Branch
avalanche_outbound_fallback_after_retries
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 18754
Build 37299: Build Difflint-circular-dependencies · build-diff · build-without-wallet · build-debug · build-clang-tidy · build-clang
Build 37298: arc lint + arc unit

Event Timeline

Fabien requested review of this revision.Apr 7 2022, 11:25
tyler-smith added a subscriber: tyler-smith.

Starting on line 2370 there is a breakdown of the overall algorithm here. I think we should update it to include this new behavior because it's specific enough that this change would make it incorrect.

The implementation itself looks good.

This revision now requires changes to proceed.Apr 11 2022, 06:48

Address feedback, update the comment

This revision is now accepted and ready to land.Apr 12 2022, 04:26