MCPcopy Create free account
hub / github.com/DeAI-Artist/Linkis / DefaultGenesisDocProviderFunc

Function DefaultGenesisDocProviderFunc

test/maverick/node/node.go:116–120  ·  view source on GitHub ↗

DefaultGenesisDocProviderFunc returns a GenesisDocProvider that loads the GenesisDoc from the config.GenesisFile() on the filesystem.

(config *cfg.Config)

Source from the content-addressed store, hash-verified

114// DefaultGenesisDocProviderFunc returns a GenesisDocProvider that loads
115// the GenesisDoc from the config.GenesisFile() on the filesystem.
116func DefaultGenesisDocProviderFunc(config *cfg.Config) GenesisDocProvider {
117 return func() (*types.GenesisDoc, error) {
118 return types.GenesisDocFromFile(config.GenesisFile())
119 }
120}
121
122// Provider takes a config and a logger and returns a ready to go Node.
123type Provider func(*cfg.Config, log.Logger) (*Node, error)

Callers 2

startNodeFunction · 0.92
DefaultNewNodeFunction · 0.70

Calls 2

GenesisDocFromFileFunction · 0.92
GenesisFileMethod · 0.80

Tested by

no test coverage detected