Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,15 @@
app.setupUpgradeHandlers(app.configurator)
app.setupUpgradeStoreLoaders()

// register snapshot extensions (e.g. CosmWasm) so state sync restores full state
if sm := app.SnapshotManager(); sm != nil {
if err := sm.RegisterExtensions(
wasmkeeper.NewWasmSnapshotter(app.CommitMultiStore(), &app.AppKeepers.WasmKeeper),
); err != nil {
panic("failed to register snapshot extension: " + err.Error())
}
}

// SDK v47 - since we do not use dep inject, this gives us access to newer gRPC services.
autocliv1.RegisterQueryServer(app.GRPCQueryRouter(), runtimeservices.NewAutoCLIQueryService(app.mm.Modules))
reflectionSvc, err := runtimeservices.NewReflectionService()
Expand Down Expand Up @@ -1040,8 +1049,8 @@
panic(err)
}
// call the before-modification hook since we're about to update the commission
staking.Hooks().BeforeValidatorModified(ctx, valBs)

Check failure on line 1052 in app/app.go

View workflow job for this annotation

GitHub Actions / build

Error return value of `(github.com/cosmos/cosmos-sdk/x/staking/types.StakingHooks).BeforeValidatorModified` is not checked (errcheck)
staking.SetValidator(ctx, v)

Check failure on line 1053 in app/app.go

View workflow job for this annotation

GitHub Actions / build

Error return value of `staking.SetValidator` is not checked (errcheck)
}
}
}
Expand All @@ -1057,7 +1066,7 @@
if err := json.Unmarshal(req.AppStateBytes, &genesisState); err != nil {
panic(err)
}
app.AppKeepers.UpgradeKeeper.SetModuleVersionMap(ctx, app.mm.GetVersionMap())

Check failure on line 1069 in app/app.go

View workflow job for this annotation

GitHub Actions / build

Error return value of `app.AppKeepers.UpgradeKeeper.SetModuleVersionMap` is not checked (errcheck)
return app.mm.InitGenesis(ctx, app.appCodec, genesisState)
}

Expand Down
Loading