statesync: keep peer despite lightblock query fail (#6692)

When a peer responds with no lightblock for the height we queried, we call the [removePeer method](https://github.com/tendermint/tendermint/blob/master/internal/statesync/reactor.go#L339). This removes the peer from the [dispatcher's list of called peer's](https://github.com/tendermint/tendermint/blob/ad6588315256162a9ef799a5a77ab7237cd46f38/internal/statesync/dispatcher.go#L159). When the dispatcher then receives responses from the removed peer, it [drops their responses](https://github.com/tendermint/tendermint/blob/ad6588315256162a9ef799a5a77ab7237cd46f38/internal/statesync/dispatcher.go#L130). These responses may be meaningful or contain a block or data that will help statesync proceed.

[The logs](https://gist.github.com/tychoish/34a1f61eaae3c36c23efc7d0001e805c), when this change is applied, show an additional 3 networking testnets passing. 

addresses:  #6691
This commit is contained in:
William Banfield
2021-07-09 17:20:25 -04:00
committed by GitHub
parent 051e127d38
commit 50b00dff71
-3
View File
@@ -338,9 +338,6 @@ func (r *Reactor) backfill(
if lb == nil {
r.Logger.Info("backfill: peer didn't have block, fetching from another peer", "height", height)
queue.retry(height)
// as we are fetching blocks backwards, if this node doesn't have the block it likely doesn't
// have any prior ones, thus we remove it from the peer list
r.dispatcher.removePeer(peer)
continue
}