mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
swarm/network: Replace ugly literals in object constructor.
This commit is contained in:
parent
153beac174
commit
2c2ec4f542
1 changed files with 7 additions and 17 deletions
|
|
@ -29,16 +29,6 @@ import (
|
|||
"github.com/ethereum/go-ethereum/swarm/pot"
|
||||
)
|
||||
|
||||
const (
|
||||
defaultMaxProxDisplay = 16
|
||||
defaultMinProxBinSize = 2
|
||||
defaultMinBinSize = 2
|
||||
defaultMaxBinSize = 4
|
||||
defaultRetryInterval = 4200000000 // 4.2 sec
|
||||
defaultMaxRetries = 42
|
||||
defaultRetryExponent = 2
|
||||
)
|
||||
|
||||
/*
|
||||
|
||||
Taking the proximity order relative to a fix point x classifies the points in
|
||||
|
|
@ -78,13 +68,13 @@ type KadParams struct {
|
|||
// NewKadParams returns a params struct with default values
|
||||
func NewKadParams() *KadParams {
|
||||
return &KadParams{
|
||||
MaxProxDisplay: defaultMaxProxDisplay,
|
||||
MinProxBinSize: defaultMinProxBinSize,
|
||||
MinBinSize: defaultMinBinSize,
|
||||
MaxBinSize: defaultMaxBinSize,
|
||||
RetryInterval: defaultRetryInterval,
|
||||
MaxRetries: defaultMaxRetries,
|
||||
RetryExponent: defaultRetryExponent,
|
||||
MaxProxDisplay: 16,
|
||||
MinProxBinSize: 2,
|
||||
MinBinSize: 2,
|
||||
MaxBinSize: 4,
|
||||
RetryInterval: 4200000000, // 4.2 sec
|
||||
MaxRetries: 42,
|
||||
RetryExponent: 2,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue