forked from TrueCloudLab/neoneo-go
Merge pull request #2194 from nspcc-dev/fix-config-types
config: fix duration parameter types
This commit is contained in:
commit
cfeaeb0f07
2 changed files with 8 additions and 10 deletions
|
@ -1,8 +1,6 @@
|
|||
package config
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/nspcc-dev/neo-go/pkg/core/storage"
|
||||
"github.com/nspcc-dev/neo-go/pkg/network/metrics"
|
||||
"github.com/nspcc-dev/neo-go/pkg/rpc"
|
||||
|
@ -14,16 +12,16 @@ type ApplicationConfiguration struct {
|
|||
AnnouncedNodePort uint16 `yaml:"AnnouncedPort"`
|
||||
AttemptConnPeers int `yaml:"AttemptConnPeers"`
|
||||
DBConfiguration storage.DBConfiguration `yaml:"DBConfiguration"`
|
||||
DialTimeout time.Duration `yaml:"DialTimeout"`
|
||||
DialTimeout int64 `yaml:"DialTimeout"`
|
||||
LogPath string `yaml:"LogPath"`
|
||||
MaxPeers int `yaml:"MaxPeers"`
|
||||
MinPeers int `yaml:"MinPeers"`
|
||||
NodePort uint16 `yaml:"NodePort"`
|
||||
PingInterval time.Duration `yaml:"PingInterval"`
|
||||
PingTimeout time.Duration `yaml:"PingTimeout"`
|
||||
PingInterval int64 `yaml:"PingInterval"`
|
||||
PingTimeout int64 `yaml:"PingTimeout"`
|
||||
Pprof metrics.Config `yaml:"Pprof"`
|
||||
Prometheus metrics.Config `yaml:"Prometheus"`
|
||||
ProtoTickInterval time.Duration `yaml:"ProtoTickInterval"`
|
||||
ProtoTickInterval int64 `yaml:"ProtoTickInterval"`
|
||||
Relay bool `yaml:"Relay"`
|
||||
RPC rpc.Config `yaml:"RPC"`
|
||||
UnlockWallet Wallet `yaml:"UnlockWallet"`
|
||||
|
|
|
@ -103,10 +103,10 @@ func NewServerConfig(cfg config.Config) ServerConfig {
|
|||
Net: protoConfig.Magic,
|
||||
Relay: appConfig.Relay,
|
||||
Seeds: protoConfig.SeedList,
|
||||
DialTimeout: appConfig.DialTimeout * time.Second,
|
||||
ProtoTickInterval: appConfig.ProtoTickInterval * time.Second,
|
||||
PingInterval: appConfig.PingInterval * time.Second,
|
||||
PingTimeout: appConfig.PingTimeout * time.Second,
|
||||
DialTimeout: time.Duration(appConfig.DialTimeout) * time.Second,
|
||||
ProtoTickInterval: time.Duration(appConfig.ProtoTickInterval) * time.Second,
|
||||
PingInterval: time.Duration(appConfig.PingInterval) * time.Second,
|
||||
PingTimeout: time.Duration(appConfig.PingTimeout) * time.Second,
|
||||
MaxPeers: appConfig.MaxPeers,
|
||||
AttemptConnPeers: appConfig.AttemptConnPeers,
|
||||
MinPeers: appConfig.MinPeers,
|
||||
|
|
Loading…
Reference in a new issue