Rename DefaultRecordTTL into DefaultRecordEOL
License: MIT Signed-off-by: Adam Uhlir <uhlir.a@gmail.com>
Adam Uhlir committed
Feb 8, 2019 at 17:06 UTC
b292fe626339cb9f8b87306c55eabc283e2058d2
2 files changed
+3
-3
namesys/namesys.go
+1
-1
@@ -173,7 +173,7 @@ func emitOnceResult(ctx context.Context, outCh chan<- onceResult, r onceResult)
173
174
// Publish implements Publisher
175
func (ns *mpns) Publish(ctx context.Context, name ci.PrivKey, value path.Path) error {
176
- return ns.PublishWithEOL(ctx, name, value, time.Now().Add(DefaultRecordTTL))
176
+ return ns.PublishWithEOL(ctx, name, value, time.Now().Add(DefaultRecordEOL))
177
}
178
179
func (ns *mpns) PublishWithEOL(ctx context.Context, name ci.PrivKey, value path.Path, eol time.Time) error {
namesys/publisher.go
+2
-2
@@ -24,7 +24,7 @@ import (
24
const ipnsPrefix = "/ipns/"
25
26
const PublishPutValTimeout = time.Minute
27
-const DefaultRecordTTL = 24 * time.Hour
27
+const DefaultRecordEOL = 24 * time.Hour
28
29
// IpnsPublisher is capable of publishing and resolving names to the IPFS
30
// routing system.
@@ -48,7 +48,7 @@ func NewIpnsPublisher(route routing.ValueStore, ds ds.Datastore) *IpnsPublisher
48
// and publishes it out to the routing system
49
func (p *IpnsPublisher) Publish(ctx context.Context, k ci.PrivKey, value path.Path) error {
50
log.Debugf("Publish %s", value)
51
- return p.PublishWithEOL(ctx, k, value, time.Now().Add(DefaultRecordTTL))
51
+ return p.PublishWithEOL(ctx, k, value, time.Now().Add(DefaultRecordEOL))
52
}
53
54
func IpnsDsKey(id peer.ID) ds.Key {