From b2da3a56849d5b18daa87e0a4f55e29c77534dca Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Tue, 19 Dec 2023 07:58:46 -0600 Subject: [PATCH] 2x NewWasmSnapshotter & InitializePinnedCodes --- app/app.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/app.go b/app/app.go index 605f175aa..58b34cb40 100644 --- a/app/app.go +++ b/app/app.go @@ -405,8 +405,8 @@ func New( if manager := app.SnapshotManager(); manager != nil { err = manager.RegisterExtensions( - // TODO: is this okay? (may not matter since we are sharing the VM instance) - // wasmkeeper.NewWasmSnapshotter(app.CommitMultiStore(), &app.AppKeepers.WasmKeeper), + // https://github.com/cosmos/ibc-go/pull/5439 + wasmkeeper.NewWasmSnapshotter(app.CommitMultiStore(), &app.AppKeepers.WasmKeeper), wasmlckeeper.NewWasmSnapshotter(app.CommitMultiStore(), &app.AppKeepers.WasmClientKeeper), ) if err != nil { @@ -449,6 +449,11 @@ func New( tmos.Exit(fmt.Sprintf("failed initialize pinned codes %s", err)) } + // https://github.com/cosmos/ibc-go/pull/5439 + if err := wasmlckeeper.InitializePinnedCodes(ctx, appCodec); err != nil { + tmos.Exit(fmt.Sprintf("failed initialize pinned codes %s", err)) + } + // Initialize and seal the capability keeper so all persistent capabilities // are loaded in-memory and prevent any further modules from creating scoped // sub-keepers.