Skip to content

Commit

Permalink
Merge pull request #21 from libp2p/feat/variable-ttls
Browse files Browse the repository at this point in the history
make it possible to modify non-permanent TTLs
  • Loading branch information
Stebalien authored Jan 5, 2018
2 parents 2752158 + b62f422 commit 24989d8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions p2p/host/peerstore/addr_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
ma "github.com/multiformats/go-multiaddr"
)

const (
var (

// TempAddrTTL is the ttl used for a short lived address
TempAddrTTL = time.Second * 10
Expand All @@ -30,7 +30,8 @@ const (
OwnObservedAddrTTL = time.Minute * 10
)

// Permanent TTLs (distinct so we can distinguish between them)
// Permanent TTLs (distinct so we can distinguish between them, constant as they
// are, in fact, permanent)
const (
// PermanentAddrTTL is the ttl for a "permanent address" (e.g. bootstrap nodes).
PermanentAddrTTL = math.MaxInt64 - iota
Expand Down

0 comments on commit 24989d8

Please sign in to comment.