namesys: fix TYPO, make constant constant
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
Jakub Sztandera committed
Dec 14, 2016 at 21:53 UTC
6a9009b8aa1185ebfc2464b580f6eb6b73df2686
2 files changed
+4
-4
namesys/namesys.go
+1
-1
@@ -93,7 +93,7 @@ func (ns *mpns) Publish(ctx context.Context, name ci.PrivKey, value path.Path) e
93
if err != nil {
94
return err
95
}
96
- ns.addToDHTCache(name, value, time.Now().Add(DefaultRecortTTL))
96
+ ns.addToDHTCache(name, value, time.Now().Add(DefaultRecordTTL))
97
return nil
98
}
99
namesys/publisher.go
+3
-3
@@ -32,8 +32,8 @@ var ErrExpiredRecord = errors.New("expired record")
32
// unknown validity type.
33
var ErrUnrecognizedValidity = errors.New("unrecognized validity type")
34
35
-var PublishPutValTimeout = time.Minute
36
-var DefaultRecortTTL = 24 * time.Hour
35
+const PublishPutValTimeout = time.Minute
36
+const DefaultRecordTTL = 24 * time.Hour
37
38
// ipnsPublisher is capable of publishing and resolving names to the IPFS
39
// routing system.
@@ -54,7 +54,7 @@ func NewRoutingPublisher(route routing.ValueStore, ds ds.Datastore) *ipnsPublish
54
// and publishes it out to the routing system
55
func (p *ipnsPublisher) Publish(ctx context.Context, k ci.PrivKey, value path.Path) error {
56
log.Debugf("Publish %s", value)
57
- return p.PublishWithEOL(ctx, k, value, time.Now().Add(DefaultRecortTTL))
57
+ return p.PublishWithEOL(ctx, k, value, time.Now().Add(DefaultRecordTTL))
58
}
59
60
// PublishWithEOL is a temporary stand in for the ipns records implementation