MCPcopy Create free account
hub / github.com/CPChain/chain / updateChainConfig

Function updateChainConfig

core/genesis.go:182–189  ·  view source on GitHub ↗
(storedcfg *configs.ChainConfig, newcfg *configs.ChainConfig, db database.Database, stored common.Hash)

Source from the content-addressed store, hash-verified

180}
181
182func updateChainConfig(storedcfg *configs.ChainConfig, newcfg *configs.ChainConfig, db database.Database, stored common.Hash) *configs.ChainConfig {
183 if storedcfg == nil {
184 log.Warn("Found genesis block without chain config")
185 }
186 // NOTICE: in future we may need to check the compatibility of old and new configurations.
187 rawdb.WriteChainConfig(db, stored, newcfg)
188 return newcfg
189}
190
191// OpenGenesisBlock opens genesis block and returns its chain configuration and hash.
192// Return errors when genesis block not exist or genesis block configuration not exist.

Callers 1

SetupGenesisBlockFunction · 0.70

Calls 1

WarnMethod · 0.65

Tested by

no test coverage detected