From cfdf4178ff21966589a8a1189c0d58f20b25ed04 Mon Sep 17 00:00:00 2001 From: vyzo Date: Sat, 13 Apr 2019 23:12:56 +0300 Subject: [PATCH] use 3hrs as routing advertisement ttl --- p2p/discovery/routing/routing.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/p2p/discovery/routing/routing.go b/p2p/discovery/routing/routing.go index 3f6a9738e5..c618ba7c63 100644 --- a/p2p/discovery/routing/routing.go +++ b/p2p/discovery/routing/routing.go @@ -37,8 +37,9 @@ func (d *RoutingDiscovery) Advertise(ctx context.Context, ns string, opts ...Opt return 0, err } - // the DHT provider record validity is 24hrs, but it is recommnded to republish every 6hrs - return 6 * time.Hour, nil + // the DHT provider record validity is 24hrs, but it is recommnded to republish at least every 6hrs + // we go one step further and republish every 3hrs + return 3 * time.Hour, nil } func (d *RoutingDiscovery) FindPeers(ctx context.Context, ns string, opts ...Option) (<-chan pstore.PeerInfo, error) {