* 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 |
||
---|---|---|
.. | ||
diff | ||
eth | ||
snap | ||
trust |