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

Function DefaultGenesisDocProviderFunc

node/node.go:88–92  ·  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

86// DefaultGenesisDocProviderFunc returns a GenesisDocProvider that loads
87// the GenesisDoc from the config.GenesisFile() on the filesystem.
88func DefaultGenesisDocProviderFunc(config *cfg.Config) GenesisDocProvider {
89 return func() (*types.GenesisDoc, error) {
90 return types.GenesisDocFromFile(config.GenesisFile())
91 }
92}
93
94// Provider takes a config and a logger and returns a ready to go Node.
95type Provider func(*cfg.Config, log.Logger) (*Node, error)

Callers 2

DefaultNewNodeFunction · 0.70

Calls 2

GenesisDocFromFileFunction · 0.92
GenesisFileMethod · 0.80

Tested by 1