Skip to content

Commit c282179

Browse files
authored
feat: keep addresses for longer (#207)
There's really no reason to expire these after 10 minutes as opposed to 30. Given that our default DHT refresh interval is 10 minutes, setting this to 30 reduces the chances that we'll "forget" peers.
1 parent c612c8e commit c282179

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/peerstore/peerstore.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ var (
2828
// ProviderAddrTTL is the TTL of an address we've received from a provider.
2929
// This is also a temporary address, but lasts longer. After this expires,
3030
// the records we return will require an extra lookup.
31-
ProviderAddrTTL = time.Minute * 10
31+
ProviderAddrTTL = time.Minute * 30
3232

3333
// RecentlyConnectedAddrTTL is used when we recently connected to a peer.
3434
// It means that we are reasonably certain of the peer's address.
35-
RecentlyConnectedAddrTTL = time.Minute * 10
35+
RecentlyConnectedAddrTTL = time.Minute * 30
3636

3737
// OwnObservedAddrTTL is used for our own external addresses observed by peers.
38-
OwnObservedAddrTTL = time.Minute * 10
38+
OwnObservedAddrTTL = time.Minute * 30
3939
)
4040

4141
// Permanent TTLs (distinct so we can distinguish between them, constant as they

0 commit comments

Comments
 (0)