Skip to content

Commit

Permalink
wip(daemon): lower dht concurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
juligasa committed Oct 8, 2024
1 parent ae423c5 commit efae61b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/ipfs/libp2p.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func NewLibp2pNode(key crypto.PrivKey, ds datastore.Batching, protocolID protoco
clean.Add(provStore)

r, err := dht.New(ctx, h,
dht.Concurrency(10),
dht.Concurrency(1),
// Forcing DHT client mode.
// This libp2p node is not meant to be a DHT server.
dht.Mode(dht.ModeClient),
Expand All @@ -112,7 +112,7 @@ func NewLibp2pNode(key crypto.PrivKey, ds datastore.Batching, protocolID protoco
dht.RoutingTableFilter(dht.PublicRoutingTableFilter),
// Not sure what those magic numbers are. Copied from dualdht package.
// We don't use it because we don't need the LAN DHT.
dht.RoutingTablePeerDiversityFilter(dht.NewRTPeerDiversityFilter(h, 2, 3)),
dht.RoutingTablePeerDiversityFilter(dht.NewRTPeerDiversityFilter(h, 1, 1)),
// Filter out all private addresses
dht.AddressFilter(func(addrs []multiaddr.Multiaddr) []multiaddr.Multiaddr {
return multiaddr.FilterAddrs(addrs, manet.IsPublicAddr)
Expand Down

0 comments on commit efae61b

Please sign in to comment.