|
|
@ -726,12 +726,13 @@ func (cfg *MempoolConfig) ValidateBasic() error { |
|
|
|
|
|
|
|
// StateSyncConfig defines the configuration for the Tendermint state sync service
|
|
|
|
type StateSyncConfig struct { |
|
|
|
Enable bool `mapstructure:"enable"` |
|
|
|
TempDir string `mapstructure:"temp_dir"` |
|
|
|
RPCServers []string `mapstructure:"rpc_servers"` |
|
|
|
TrustPeriod time.Duration `mapstructure:"trust_period"` |
|
|
|
TrustHeight int64 `mapstructure:"trust_height"` |
|
|
|
TrustHash string `mapstructure:"trust_hash"` |
|
|
|
Enable bool `mapstructure:"enable"` |
|
|
|
TempDir string `mapstructure:"temp_dir"` |
|
|
|
RPCServers []string `mapstructure:"rpc_servers"` |
|
|
|
TrustPeriod time.Duration `mapstructure:"trust_period"` |
|
|
|
TrustHeight int64 `mapstructure:"trust_height"` |
|
|
|
TrustHash string `mapstructure:"trust_hash"` |
|
|
|
DiscoveryTime time.Duration `mapstructure:"discovery_time"` |
|
|
|
} |
|
|
|
|
|
|
|
func (cfg *StateSyncConfig) TrustHashBytes() []byte { |
|
|
@ -746,7 +747,8 @@ func (cfg *StateSyncConfig) TrustHashBytes() []byte { |
|
|
|
// DefaultStateSyncConfig returns a default configuration for the state sync service
|
|
|
|
func DefaultStateSyncConfig() *StateSyncConfig { |
|
|
|
return &StateSyncConfig{ |
|
|
|
TrustPeriod: 168 * time.Hour, |
|
|
|
TrustPeriod: 168 * time.Hour, |
|
|
|
DiscoveryTime: 15 * time.Second, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|