Skip to content

Commit

Permalink
Rename DefaultRecordTTL into DefaultRecordEOL
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Adam Uhlir <uhlir.a@gmail.com>
  • Loading branch information
AuHau committed Feb 11, 2019
1 parent ff275f4 commit b292fe6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion namesys/namesys.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func emitOnceResult(ctx context.Context, outCh chan<- onceResult, r onceResult)

// Publish implements Publisher
func (ns *mpns) Publish(ctx context.Context, name ci.PrivKey, value path.Path) error {
return ns.PublishWithEOL(ctx, name, value, time.Now().Add(DefaultRecordTTL))
return ns.PublishWithEOL(ctx, name, value, time.Now().Add(DefaultRecordEOL))
}

func (ns *mpns) PublishWithEOL(ctx context.Context, name ci.PrivKey, value path.Path, eol time.Time) error {
Expand Down
4 changes: 2 additions & 2 deletions namesys/publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
const ipnsPrefix = "/ipns/"

const PublishPutValTimeout = time.Minute
const DefaultRecordTTL = 24 * time.Hour
const DefaultRecordEOL = 24 * time.Hour

// IpnsPublisher is capable of publishing and resolving names to the IPFS
// routing system.
Expand All @@ -48,7 +48,7 @@ func NewIpnsPublisher(route routing.ValueStore, ds ds.Datastore) *IpnsPublisher
// 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(DefaultRecordTTL))
return p.PublishWithEOL(ctx, k, value, time.Now().Add(DefaultRecordEOL))
}

func IpnsDsKey(id peer.ID) ds.Key {
Expand Down

0 comments on commit b292fe6

Please sign in to comment.