diff --git a/namesys/namesys.go b/namesys/namesys.go index 3fa72c332..8acc1dc2c 100644 --- a/namesys/namesys.go +++ b/namesys/namesys.go @@ -93,7 +93,7 @@ func (ns *mpns) Publish(ctx context.Context, name ci.PrivKey, value path.Path) e if err != nil { return err } - ns.addToDHTCache(name, value, time.Now().Add(time.Hour*24)) + ns.addToDHTCache(name, value, time.Now().Add(DefaultRecortTTL)) return nil } diff --git a/namesys/publisher.go b/namesys/publisher.go index 795023c83..5f5a15abd 100644 --- a/namesys/publisher.go +++ b/namesys/publisher.go @@ -33,6 +33,7 @@ var ErrExpiredRecord = errors.New("expired record") var ErrUnrecognizedValidity = errors.New("unrecognized validity type") var PublishPutValTimeout = time.Minute +var DefaultRecortTTL = 24 * time.Hour // ipnsPublisher is capable of publishing and resolving names to the IPFS // routing system. @@ -53,7 +54,7 @@ func NewRoutingPublisher(route routing.ValueStore, ds ds.Datastore) *ipnsPublish // and publishes it out to the routing system func (p *ipnsPublisher) Publish(ctx context.Context, k ci.PrivKey, value path.Path) error { log.Debugf("Publish %s", value) - return p.PublishWithEOL(ctx, k, value, time.Now().Add(time.Hour*24)) + return p.PublishWithEOL(ctx, k, value, time.Now().Add(DefaultRecortTTL)) } // PublishWithEOL is a temporary stand in for the ipns records implementation