Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: increase the max record age to 48h (PUT_VALUE, RFM17) #794

Merged
merged 2 commits into from
Dec 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ var Defaults = func(o *Config) error {
o.RoutingTable.RefreshInterval = 10 * time.Minute
o.RoutingTable.AutoRefresh = true
o.RoutingTable.PeerFilter = EmptyRTFilter
o.MaxRecordAge = time.Hour * 36
o.MaxRecordAge = providers.ProvideValidity

o.BucketSize = defaultBucketSize
o.Concurrency = 10
Expand Down
3 changes: 2 additions & 1 deletion providers/providers_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ const ProvidersKeyPrefix = "/providers/"
// the records we return will require an extra lookup.
const ProviderAddrTTL = time.Minute * 30

// ProvideValidity is the default time that a provider record should last
// ProvideValidity is the default time that a Provider Record should last on DHT
// This value is also known as Provider Record Expiration Interval.
var ProvideValidity = time.Hour * 48
var defaultCleanupInterval = time.Hour
var lruCacheSize = 256
Expand Down