MCPcopy Create free account
hub / github.com/ethstorage/es-node / Check

Method Check

ethstorage/node/config.go:91–113  ·  view source on GitHub ↗

Check verifies that the given configuration makes sense

()

Source from the content-addressed store, hash-verified

89
90// Check verifies that the given configuration makes sense
91func (cfg *Config) Check() error {
92 // if err := cfg.L2.Check(); err != nil {
93 // return fmt.Errorf("l2 endpoint config error: %w", err)
94 // }
95 // if err := cfg.L2Sync.Check(); err != nil {
96 // return fmt.Errorf("sync config error: %w", err)
97 // }
98 // if err := cfg.Rollup.Check(); err != nil {
99 // return fmt.Errorf("rollup config error: %w", err)
100 // }
101 if err := cfg.Metrics.Check(); err != nil {
102 return fmt.Errorf("metrics config error: %w", err)
103 }
104 if err := cfg.Pprof.Check(); err != nil {
105 return fmt.Errorf("pprof config error: %w", err)
106 }
107 if cfg.P2P != nil {
108 if err := cfg.P2P.Check(); err != nil {
109 return fmt.Errorf("p2p config error: %w", err)
110 }
111 }
112 return nil
113}
114
115// ResolvePath resolves path in the instance directory.
116func (c *Config) ResolvePath(path string) string {

Callers

nothing calls this directly

Calls 1

CheckMethod · 0.65

Tested by

no test coverage detected