MCPcopy Create free account
hub / github.com/tendermint/tendermint / LoadConfig

Function LoadConfig

test/e2e/node/config.go:43–54  ·  view source on GitHub ↗

LoadConfig loads the configuration from disk.

(file string)

Source from the content-addressed store, hash-verified

41
42// LoadConfig loads the configuration from disk.
43func LoadConfig(file string) (*Config, error) {
44 cfg := &Config{
45 Listen: "unix:///var/run/app.sock",
46 Protocol: "socket",
47 PersistInterval: 1,
48 }
49 _, err := toml.DecodeFile(file, &cfg)
50 if err != nil {
51 return nil, fmt.Errorf("failed to load config from %q: %w", file, err)
52 }
53 return cfg, cfg.Validate()
54}
55
56// Validate validates the configuration. We don't do exhaustive config
57// validation here, instead relying on Testnet.Validate() to handle it.

Callers 1

runFunction · 0.70

Calls 1

ValidateMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…