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

Function saveGenesisDoc

node/node.go:1437–1447  ·  view source on GitHub ↗

panics if failed to marshal the given genesis document

(db dbm.DB, genDoc *types.GenesisDoc)

Source from the content-addressed store, hash-verified

1435
1436// panics if failed to marshal the given genesis document
1437func saveGenesisDoc(db dbm.DB, genDoc *types.GenesisDoc) error {
1438 b, err := tmjson.Marshal(genDoc)
1439 if err != nil {
1440 return fmt.Errorf("failed to save genesis doc due to marshaling error: %w", err)
1441 }
1442 if err := db.SetSync(genesisDocKey, b); err != nil {
1443 return err
1444 }
1445
1446 return nil
1447}
1448
1449func createAndStartPrivValidatorSocketClient(
1450 listenAddr,

Callers 1

Calls 1

MarshalMethod · 0.45

Tested by

no test coverage detected