Fix cap initialization by writing to uncached context (#6136)
This commit is contained in:
parent
9ec46de285
commit
687d4246e5
|
@ -31,3 +31,7 @@ func (app *BaseApp) NewContext(isCheckTx bool, header abci.Header) sdk.Context {
|
|||
|
||||
return sdk.NewContext(app.deliverState.ms, header, false, app.logger)
|
||||
}
|
||||
|
||||
func (app *BaseApp) NewUncachedContext(isCheckTx bool, header abci.Header) sdk.Context {
|
||||
return sdk.NewContext(app.cms, header, isCheckTx, app.logger)
|
||||
}
|
||||
|
|
|
@ -345,7 +345,7 @@ func NewSimApp(
|
|||
// sub-keepers.
|
||||
// This must be done during creation of baseapp rather than in InitChain so
|
||||
// that in-memory capabilities get regenerated on app restart
|
||||
ctx := app.BaseApp.NewContext(true, abci.Header{})
|
||||
ctx := app.BaseApp.NewUncachedContext(true, abci.Header{})
|
||||
app.CapabilityKeeper.InitializeAndSeal(ctx)
|
||||
|
||||
app.ScopedIBCKeeper = scopedIBCKeeper
|
||||
|
|
Loading…
Reference in New Issue