Skip to content

Commit

Permalink
fix(shwap/discovery): increase DHT refresh interval to default 10mins (
Browse files Browse the repository at this point in the history
…#4150)

Closes #4147
  • Loading branch information
Wondertan authored Mar 6, 2025
1 parent 9c1d27a commit 1147366
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions share/shwap/p2p/discovery/dht.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package discovery
import (
"context"
"fmt"
"time"

"github.com/ipfs/go-datastore"
dht "github.com/libp2p/go-libp2p-kad-dht"
Expand All @@ -12,10 +11,6 @@ import (
"github.com/libp2p/go-libp2p/core/protocol"
)

const (
defaultRoutingRefreshPeriod = time.Minute
)

// PeerRouting provides constructor for PeerRouting over DHT.
// Basically, this provides a way to discover peer addresses by respecting public keys.
func NewDHT(
Expand All @@ -30,7 +25,6 @@ func NewDHT(
dht.BootstrapPeers(bootsrappers...),
dht.ProtocolPrefix(protocol.ID(fmt.Sprintf("/celestia/%s", prefix))),
dht.Datastore(dataStore),
dht.RoutingTableRefreshPeriod(defaultRoutingRefreshPeriod),
dht.Mode(mode),
}

Expand Down

0 comments on commit 1147366

Please sign in to comment.