Page MenuHomePhabricator

[avalanche] Remove the network bypass flag, make it default for avalanche outbounds
ClosedPublic

Authored by Fabien on Aug 4 2022, 20:39.

Details

Summary

This diff removes the -bypassnetgrouplimit flag in favor of a permanent bypass for the avalanche outbounds. It also fixes a couple issues that are preventing connecting non avalanche outbounds after we connected enough avalanche peers:

  • The outbound type counters have fallthrough path that cause the non avalanche outbound count to be wrong.
  • The group limit should still apply to non avalanche peers in the fallback case, when we couldn't find an avalanche peer.

Depends on D11833.

Test Plan
ninja all check-all

Diff Detail

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

Event Timeline

Fabien requested review of this revision.Aug 4 2022, 20:39
sdulfari requested changes to this revision.Aug 6 2022, 08:25
sdulfari added a subscriber: sdulfari.
sdulfari added inline comments.
src/net.cpp
2554 ↗(On Diff #34593)

This needs a test case

This revision now requires changes to proceed.Aug 6 2022, 08:25
Fabien requested review of this revision.Aug 6 2022, 12:02
Fabien added inline comments.
src/net.cpp
2554 ↗(On Diff #34593)

That's the last case in the test below: // Group limit still applies to non avalanche outbounds.

src/net.cpp
2554 ↗(On Diff #34593)

I mean specifically this part of the check: nOutboundFullRelay >= m_max_outbound_full_relay since you are modifying the behavior here.

Expand the test case to cover the change

This revision is now accepted and ready to land.Aug 8 2022, 15:55