Skip to content

Commit

Permalink
fix: register missing Wasm snapshotter extension (#1069)
Browse files Browse the repository at this point in the history
  • Loading branch information
RiccardoM committed Jan 18, 2023
1 parent f85bcdb commit 3dc2d60
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type: fix
module: other
pull_request: 1069
description: Register missing Wasm snapshotter extension
backward_compatible: true
date: 2023-01-17T16:57:07.714192798Z
12 changes: 12 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package app

import (
"encoding/json"
"fmt"
"io"
"net/http"
"os"
Expand Down Expand Up @@ -912,6 +913,17 @@ func NewDesmosApp(
app.SetAnteHandler(anteHandler)
app.SetEndBlocker(app.EndBlocker)

// Must be before Loading version.
// Requires the snapshot store to be created and registered as a BaseAppOption
if manager := app.SnapshotManager(); manager != nil {
err := manager.RegisterExtensions(
wasmkeeper.NewWasmSnapshotter(app.CommitMultiStore(), &app.WasmKeeper),
)
if err != nil {
panic(fmt.Errorf("failed to register snapshot extension: %s", err))
}
}

if loadLatest {
if err := app.LoadLatestVersion(); err != nil {
tmos.Exit(err.Error())
Expand Down

0 comments on commit 3dc2d60

Please sign in to comment.