MCPcopy Create free account
hub / github.com/akash-network/node / InitChainer

Method InitChainer

app/app.go:419–430  ·  view source on GitHub ↗

InitChainer application update at chain initialization

(ctx sdk.Context, req *abci.RequestInitChain)

Source from the content-addressed store, hash-verified

417
418// InitChainer application update at chain initialization
419func (app *AkashApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error) {
420 var genesisState GenesisState
421 if err := tmjson.Unmarshal(req.AppStateBytes, &genesisState); err != nil {
422 panic(err)
423 }
424 err := app.Keepers.Cosmos.Upgrade.SetModuleVersionMap(ctx, app.MM.GetVersionMap())
425 if err != nil {
426 panic(err)
427 }
428
429 return app.MM.InitGenesis(ctx, app.cdc, genesisState)
430}
431
432// PreBlocker application updates before each begin block.
433func (app *AkashApp) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) {

Callers 1

TestAppImportExportFunction · 0.80

Calls 1

InitGenesisMethod · 0.65

Tested by 1

TestAppImportExportFunction · 0.64