namesys: fix TYPO, make constant constant

License: MIT
Signed-off-by: 's avatarJakub Sztandera <kubuxu@protonmail.ch>
上级 2d37e603
......@@ -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(DefaultRecortTTL))
ns.addToDHTCache(name, value, time.Now().Add(DefaultRecordTTL))
return nil
}
......
......@@ -32,8 +32,8 @@ var ErrExpiredRecord = errors.New("expired record")
// unknown validity type.
var ErrUnrecognizedValidity = errors.New("unrecognized validity type")
var PublishPutValTimeout = time.Minute
var DefaultRecortTTL = 24 * time.Hour
const PublishPutValTimeout = time.Minute
const DefaultRecordTTL = 24 * time.Hour
// ipnsPublisher is capable of publishing and resolving names to the IPFS
// routing system.
......@@ -54,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(DefaultRecortTTL))
return p.PublishWithEOL(ctx, k, value, time.Now().Add(DefaultRecordTTL))
}
// PublishWithEOL is a temporary stand in for the ipns records implementation
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论