Skip to content

Commit

Permalink
refactor: make ChainPollInterval useful, 1s by default
Browse files Browse the repository at this point in the history
  • Loading branch information
randomshinichi committed Jan 21, 2020
1 parent 9367aeb commit 04136e9
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package config

import (
"math/big"
"time"
)

// The main purpose of these constants is to relieve the user from having to
Expand Down Expand Up @@ -132,12 +133,12 @@ type ClientConfig struct {

// TuningConfig fine tuning of parameters of the client
type TuningConfig struct {
ChainPollInterval int64 `json:"chain_poll_interval" yaml:"chain_poll_interval" mapstructure:"chain_poll_interval"`
ChainTimeout int64 `json:"chain_timeout" yaml:"chain_timeout" mapstructure:"chain_timeout"`
CryptoKdfMemlimit uint32 `json:"crypto_kdf_memlimit" yaml:"crypto_kdf_memlimit" mapstructure:"crypto_kdf_memlimit"`
CryptoKdfOpslimit uint32 `json:"crypto_kdf_opslimit" yaml:"crypto_kdf_opslimit" mapstructure:"crypto_kdf_opslimit"`
CryptoKdfThreads uint8 `json:"crypto_kdf_threads" yaml:"crypto_kdf_threads" mapstructure:"crypto_kdf_threads"`
OutputFormatJSON bool `json:"-" yaml:"-" mapstructure:"-"`
ChainPollInterval time.Duration `json:"chain_poll_interval" yaml:"chain_poll_interval" mapstructure:"chain_poll_interval"`
ChainTimeout int64 `json:"chain_timeout" yaml:"chain_timeout" mapstructure:"chain_timeout"`
CryptoKdfMemlimit uint32 `json:"crypto_kdf_memlimit" yaml:"crypto_kdf_memlimit" mapstructure:"crypto_kdf_memlimit"`
CryptoKdfOpslimit uint32 `json:"crypto_kdf_opslimit" yaml:"crypto_kdf_opslimit" mapstructure:"crypto_kdf_opslimit"`
CryptoKdfThreads uint8 `json:"crypto_kdf_threads" yaml:"crypto_kdf_threads" mapstructure:"crypto_kdf_threads"`
OutputFormatJSON bool `json:"-" yaml:"-" mapstructure:"-"`
}

// ProfileConfig a configuration profile
Expand Down Expand Up @@ -201,7 +202,7 @@ var Client = ClientConfig{

// Tuning holds default settings for TuningConfig
var Tuning = TuningConfig{
ChainPollInterval: 100,
ChainPollInterval: 1 * time.Second,
ChainTimeout: 5000,
CryptoKdfMemlimit: 1024 * 32, // 32MB
CryptoKdfOpslimit: 3,
Expand Down

0 comments on commit 04136e9

Please sign in to comment.