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"
|
"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
|
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
|
// NewKadParams returns a params struct with default values
|
||||||
func NewKadParams() *KadParams {
|
func NewKadParams() *KadParams {
|
||||||
return &KadParams{
|
return &KadParams{
|
||||||
MaxProxDisplay: defaultMaxProxDisplay,
|
MaxProxDisplay: 16,
|
||||||
MinProxBinSize: defaultMinProxBinSize,
|
MinProxBinSize: 2,
|
||||||
MinBinSize: defaultMinBinSize,
|
MinBinSize: 2,
|
||||||
MaxBinSize: defaultMaxBinSize,
|
MaxBinSize: 4,
|
||||||
RetryInterval: defaultRetryInterval,
|
RetryInterval: 4200000000, // 4.2 sec
|
||||||
MaxRetries: defaultMaxRetries,
|
MaxRetries: 42,
|
||||||
RetryExponent: defaultRetryExponent,
|
RetryExponent: 2,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue