Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ping-ke committed Sep 18, 2024
1 parent a8a6ded commit c5a0fb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ethstorage/p2p/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ func (n *NodeP2P) init(resourcesCtx context.Context, rollupCfg *rollup.EsConfig,
// n.RequestShardList to fetch the shard list of the new node.
remoteShardList, e := n.RequestShardList(remotePeerId)
if e != nil && len(n.host.Peerstore().Addrs(remotePeerId)) == 0 {
// As the node host enable NATService, which will create a new connection with another
// peer id and its Addrs will not be set to Peerstore. So if len of peer Addrs is 0 and
// As the remote node host may enable NATService, which will create a new connection with another
// peer id and its Addrs will not be set to local host's Peerstore. So if len of peer Addrs is 0 and
// cannot get the remote node's shard list, then ignore this connection.
log.Debug("No addresses to get shard list, return without close conn", "peer", n.host.ID(), "remote peer",
remotePeerId, "Direction", conn.Stat().Direction, "remote address", conn.RemoteMultiaddr().String(), "error", e.Error())
Expand Down

0 comments on commit c5a0fb3

Please sign in to comment.