Context
From PR #909 review (ch4r10t33r, item #2).
Peers that report head_slot=0 are either freshly connected (no status exchanged yet) or genuinely empty. Routing blocks-by-root requests to them wastes a round-trip and a timeout cycle.
Proposal
Add an optional min_slot parameter to selectPeer() that filters out peers whose last-known head_slot is below the threshold.
Acceptance criteria
Related: PR #909
Context
From PR #909 review (ch4r10t33r, item #2).
Peers that report
head_slot=0are either freshly connected (no status exchanged yet) or genuinely empty. Routing blocks-by-root requests to them wastes a round-trip and a timeout cycle.Proposal
Add an optional
min_slotparameter toselectPeer()that filters out peers whose last-knownhead_slotis below the threshold.Acceptance criteria
selectPeeraccepts an optional minimum slothead_slot < min_slotexcluded from candidate setRelated: PR #909