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

change network connect way #410

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on Sep 21, 2017

  1. network change

    1. When receive address message save the addresses
    in address list.
    2. If the connection is less than MaxOutboundCnt, select
    addresses from address list and connect them.
    3. When receive getaddr request, randomly select some address
    and send addr response. At most send 8 address.
    
    Signed-off-by: Jin Qing <[email protected]>
    superJinQing committed Sep 21, 2017
    Configuration menu
    Copy the full SHA
    b0c91b5 View commit details
    Browse the repository at this point in the history
  2. [PATCH 1/2] disable reconnect function

    If the connection is less than MaxOutboundCnt,
    the node will pick peers from address list and connect them.
    So we don't need reconnect now.
    
    Signed-off-by: Jin Qing <[email protected]>
    superJinQing committed Sep 21, 2017
    Configuration menu
    Copy the full SHA
    a11b0b2 View commit details
    Browse the repository at this point in the history
  3. [PATCH 2/2] the connection should less than max connet peers

    If the connection more than max connect peers,
    disconnect one node.
    
    Signed-off-by: Jin Qing <[email protected]>
    superJinQing committed Sep 21, 2017
    Configuration menu
    Copy the full SHA
    513e30f View commit details
    Browse the repository at this point in the history
  4. If address list less than 1000 send getaddr req

    If address list less than 1000 send getaddr request
    
    Signed-off-by: Jin Qing <[email protected]>
    superJinQing committed Sep 21, 2017
    Configuration menu
    Copy the full SHA
    bbb18fd View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2017

  1. Add rule to judge if node is bad

    Judge whether the peer is bad before connect it.
    If it is bad won't connect it.
    
    Signed-off-by: Jin Qing <[email protected]>
    superJinQing committed Sep 30, 2017
    Configuration menu
    Copy the full SHA
    7477fe4 View commit details
    Browse the repository at this point in the history