advertise for relay services every 30min
@@ -11,6 +11,7 @@ import (
var (
// this is purposefully long to require some node stability before advertising as a relay
AdvertiseBootDelay = 15 * time.Minute
+ AdvertiseTTL = 30 * time.Minute
)
// Advertise advertises this node as a libp2p relay.
@@ -18,7 +19,7 @@ func Advertise(ctx context.Context, advertise discovery.Advertiser) {
go func() {
select {
case <-time.After(AdvertiseBootDelay):
- discovery.Advertise(ctx, advertise, RelayRendezvous)
+ discovery.Advertise(ctx, advertise, RelayRendezvous, discovery.TTL(AdvertiseTTL))
case <-ctx.Done():
}
}()
