Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: register missing Wasm snapshotter extension #1069

Merged
merged 3 commits into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
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
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
3 changes: 2 additions & 1 deletion x/posts/testutil/expected_keepers_mocks.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion x/profiles/keeper/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import (
"fmt"
"time"

"github.com/desmos-labs/desmos/v4/testutil/profilestesting"
"github.com/golang/mock/gomock"

"github.com/desmos-labs/desmos/v4/testutil/profilestesting"

sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types"
Expand Down
3 changes: 2 additions & 1 deletion x/subspaces/client/cli/tx_treasury.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ import (
authzcli "github.com/cosmos/cosmos-sdk/x/authz/client/cli"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
"github.com/desmos-labs/desmos/v4/x/subspaces/types"
"github.com/spf13/cobra"
"github.com/spf13/pflag"

"github.com/desmos-labs/desmos/v4/x/subspaces/types"
)

// DONTCOVER
Expand Down
3 changes: 2 additions & 1 deletion x/subspaces/client/cli/tx_treasury_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import (
clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli"
sdk "github.com/cosmos/cosmos-sdk/types"
authzcli "github.com/cosmos/cosmos-sdk/x/authz/client/cli"
"github.com/desmos-labs/desmos/v4/x/subspaces/client/cli"
"github.com/gogo/protobuf/proto"

"github.com/desmos-labs/desmos/v4/x/subspaces/client/cli"
)

func (s *IntegrationTestSuite) TestCmdRevokeGrantAuthorization() {
Expand Down
1 change: 1 addition & 0 deletions x/subspaces/keeper/msg_server_treasury.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"

"github.com/desmos-labs/desmos/v4/x/subspaces/types"
)

Expand Down
1 change: 1 addition & 0 deletions x/subspaces/legacy/v5/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/store/prefix"
sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/desmos-labs/desmos/v4/x/subspaces/types"
)

Expand Down
3 changes: 2 additions & 1 deletion x/subspaces/legacy/v5/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ import (
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper"
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"

"github.com/stretchr/testify/require"

"github.com/desmos-labs/desmos/v4/app"
"github.com/desmos-labs/desmos/v4/testutil/storetesting"
v5 "github.com/desmos-labs/desmos/v4/x/subspaces/legacy/v5"
"github.com/desmos-labs/desmos/v4/x/subspaces/types"
"github.com/stretchr/testify/require"
)

func TestMigrateStore(t *testing.T) {
Expand Down
1 change: 1 addition & 0 deletions x/subspaces/types/models_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"time"

authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"

"github.com/desmos-labs/desmos/v4/x/subspaces/types"

"github.com/stretchr/testify/require"
Expand Down
3 changes: 2 additions & 1 deletion x/subspaces/types/msgs_treasury_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
"github.com/desmos-labs/desmos/v4/x/subspaces/types"
"github.com/stretchr/testify/require"

"github.com/desmos-labs/desmos/v4/x/subspaces/types"
)

var msgGrantTreasuryAuthorization = types.NewMsgGrantTreasuryAuthorization(
Expand Down