Skip to content

Commit 17aff57

Browse files
mergify[bot]javiersuweijiejulienrbrt
authored andcommitted
fix: remove unnecessary cms typecasting (backport cosmos#14054) (cosmos#15669)
Co-authored-by: Javier Su <[email protected]> Co-authored-by: Julien Robert <[email protected]>
1 parent 89e85f2 commit 17aff57

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
4646

4747
* (simapp) [#15305](https://github.com/cosmos/cosmos-sdk/pull/15305) Add `AppStateFnWithExtendedCb` with callback function to extend rawState and `AppStateRandomizedFnWithState` with extra genesisState argument which is the genesis state of the app.
4848
* (x/distribution) [#15462](https://github.com/cosmos/cosmos-sdk/pull/15462) Add delegator address to the event for withdrawing delegation rewards
49+
* [#14019](https://github.com/cosmos/cosmos-sdk/issues/14019) Remove the interface casting to allow other implementations of a `CommitMultiStore`.
4950

5051
### Bug Fixes
5152

baseapp/baseapp.go

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package baseapp
22

33
import (
4-
"context"
54
"errors"
65
"fmt"
76
"strings"
@@ -14,8 +13,9 @@ import (
1413
dbm "github.com/tendermint/tm-db"
1514

1615
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
17-
servertypes "github.com/cosmos/cosmos-sdk/server/types"
18-
"github.com/cosmos/cosmos-sdk/telemetry"
16+
"github.com/cosmos/cosmos-sdk/snapshots"
17+
"github.com/cosmos/cosmos-sdk/store"
18+
storetypes "github.com/cosmos/cosmos-sdk/store/types"
1919
sdk "github.com/cosmos/cosmos-sdk/types"
2020
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
2121
"github.com/cosmos/cosmos-sdk/types/mempool"
@@ -408,6 +408,10 @@ func (app *BaseApp) Init() error {
408408
app.setState(execModeCheck, emptyHeader)
409409
app.Seal()
410410

411+
if app.cms == nil {
412+
return errors.New("commit multi-store must not be nil")
413+
}
414+
411415
return app.cms.GetPruning().Validate()
412416
}
413417

0 commit comments

Comments
 (0)