Page MenuHomePhabricator

Protect last outbound HB compact block peer
ClosedPublic

Authored by PiRK on Mar 15 2023, 08:48.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC825b7bc9f1f5: Protect last outbound HB compact block peer
Summary

If all our high-bandwidth compact block serving peers (BIP 152) stall block
download, then we can be denied a block for (potentially) a long time. As
inbound connections are much more likely to be adversarial than outbound
connections, mitigate this risk by never removing our last outbound HB peer if
it would be replaced by an inbound.

This is a backport of core#22147

Test Plan

ninja all check-all

Diff Detail

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

Event Timeline

PiRK requested review of this revision.Mar 15 2023, 08:48
PiRK planned changes to this revision.Mar 15 2023, 08:50

fix conflict resolution mistake: move if (nodestate->m_is_inbound) ... out of the for loop

This revision is now accepted and ready to land.Mar 15 2023, 09:39