Ava Chow 4a903741b0
Merge bitcoin/bitcoin#28120: p2p: make block download logic aware of limited peers threshold
c5b5843d8f10d96f76ee6b95f2b1b1b4ce755f75 test: avoid requesting blocks beyond limited peer threshold (furszy)
2f6a05512fa86d086b2b976c401394571d88bd93 p2p: sync from limited peer, only request blocks below threshold (furszy)
73127722a2d2b5c8da4102284f9d0cf504a2e72d refactor: Make FindNextBlocks friendlier (furszy)

Pull request description:

  Even when the node believes it has IBD completed, need to avoid
  requesting historical blocks from network-limited peers.
  Otherwise, the limited peer will disconnect right away.

  The simplest scenario could be a node that gets synced, drops
  connections, and stays inactive for a while. Then, once it re-connects
  (IBD stays completed), the node tries to fetch all the missing blocks
  from any peer, getting disconnected by the limited ones.

  Note:
  Can verify the behavior by cherry-picking the test commit alone on
  master. It will fail there.

ACKs for top commit:
  achow101:
    ACK c5b5843d8f10d96f76ee6b95f2b1b1b4ce755f75
  vasild:
    ACK c5b5843d8f10d96f76ee6b95f2b1b1b4ce755f75
  mzumsande:
    Code Review ACK c5b5843d8f10d96f76ee6b95f2b1b1b4ce755f75
  pinheadmz:
    ACK c5b5843d8f10d96f76ee6b95f2b1b1b4ce755f75

Tree-SHA512: 9e550698bc6e63cc587b2b988a87d0ab555a8fa188c91c3f33287f8201d77c28b373331845356ad86f17bb21c15950b6466bc1cafd0ce8139d70364cb71c2ad2
2024-03-11 08:15:42 -04:00
..
2024-02-15 14:37:01 +01:00
2023-12-11 18:22:13 +01:00
2024-02-01 13:52:05 +01:00
2024-03-04 19:53:30 -05:00
2023-11-21 13:15:44 +00:00
2023-12-11 18:22:13 +01:00
2023-11-16 11:36:22 +10:00
2023-11-30 11:28:19 +01:00
2023-11-28 12:42:07 +01:00
2023-11-30 11:27:54 +01:00
2024-01-05 17:16:38 +00:00
2024-02-01 13:52:05 +01:00
2023-11-16 11:36:22 +10:00