b3a20c7611
* fix: p2p sync with lagging peer no need to sync with lagging peer, which could make the local chain stalling as well. * fix: do not drop lagging peer, will retry it later. The lagging peer is probably already the best peer with largest total difficulty. Shoule not remove it, since p2p is a bidirectional connection, drop it could make the peer unable to sync with this peer as well. And the lagging peer could catch up later, so keep it. * p2p: add lagging field in Peer lagging peer will be connected, but won't be used to sync. the lagging flag can be clear once the Peer updates its latest block state. * test: fix UT compile issue * fix: lagging peer func rename * test: fix a UT fail of download test errStallingPeer is replaced by errLaggingPeer in this case * fix: lagging issue in light mode * test: add and resolve UT of lagging peer |
||
---|---|---|
.. | ||
catalyst | ||
downloader | ||
ethconfig | ||
fetcher | ||
filters | ||
gasprice | ||
protocols | ||
tracers | ||
api_backend.go | ||
api_test.go | ||
api.go | ||
backend.go | ||
bloombits.go | ||
discovery.go | ||
handler_diff_test.go | ||
handler_diff.go | ||
handler_eth_test.go | ||
handler_eth.go | ||
handler_snap.go | ||
handler_test.go | ||
handler_trust.go | ||
handler.go | ||
peer.go | ||
peerset.go | ||
state_accessor.go | ||
sync_test.go | ||
sync.go |