Skip to content

Commit

Permalink
Do not touch DHT peerstore
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrvivian committed Apr 30, 2024
1 parent 2afd176 commit 6c1815f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions pkg/network/p2p/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/libp2p/go-libp2p/core/host"
p2pnetwork "github.com/libp2p/go-libp2p/core/network"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/libp2p/go-libp2p/core/peerstore"
"github.com/multiformats/go-multiaddr"
"google.golang.org/protobuf/proto"

Expand Down Expand Up @@ -124,8 +123,6 @@ func (m *Manager) DialPeer(ctx context.Context, peer *network.Peer) error {
return ierrors.WithMessagef(network.ErrMaxAutopeeringPeersReached, "peer %s is not allowed", peer.ID.String())
}

// Adds the peer's multiaddresses to the peerstore, so that they can be used for dialing.
m.libp2pHost.Peerstore().AddAddrs(peer.ID, m.addrFilter(peer.PeerAddresses), peerstore.ConnectedAddrTTL)
cancelCtx := ctx

stream, err := m.P2PHost().NewStream(cancelCtx, peer.ID, network.CoreProtocolID)
Expand Down

0 comments on commit 6c1815f

Please sign in to comment.