Reduce bandwidth during initial headers sync when a block is found
Summary:
If our headers chain is behind on startup, then if a block is found we'll try
to catch up from all peers announcing the block, in addition to our initial
headers-sync peer. This commit changes behavior so that in this situation,
we'll choose at most one peer announcing a block to additionally sync headers
from.
This is a backport of core#25720
Depends on D14913
Test Plan:
ninja all check-all
I also successfully ran the new functional test 50 times to reduce the risks of introducing a flaky test.
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D14914