Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: p2p sync with lagging peer #1301

Merged
merged 8 commits into from
Feb 9, 2023

Commits on Feb 5, 2023

  1. fix: p2p sync with lagging peer

    no need to sync with lagging peer, which could make the local chain stalling as well.
    setunapo committed Feb 5, 2023
    Configuration menu
    Copy the full SHA
    6dc926f View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2023

  1. 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.
    setunapo committed Feb 6, 2023
    Configuration menu
    Copy the full SHA
    3a940ea View commit details
    Browse the repository at this point in the history
  2. 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.
    setunapo committed Feb 6, 2023
    Configuration menu
    Copy the full SHA
    2cccbd3 View commit details
    Browse the repository at this point in the history
  3. test: fix UT compile issue

    setunapo committed Feb 6, 2023
    Configuration menu
    Copy the full SHA
    a991495 View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2023

  1. Configuration menu
    Copy the full SHA
    f31c142 View commit details
    Browse the repository at this point in the history
  2. test: fix a UT fail of download test

    errStallingPeer is replaced by errLaggingPeer in this case
    brilliant-lx committed Feb 7, 2023
    Configuration menu
    Copy the full SHA
    5bca078 View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2023

  1. Configuration menu
    Copy the full SHA
    c74f9c1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    97820e3 View commit details
    Browse the repository at this point in the history