Skip to content

Type casting errors when using a different CommitMultiStore implementation #14019

@javiersuweijie

Description

@javiersuweijie

Summary

Type cast in baseapp.Init() prevents usage of any other implementations of CommitMultiStore

rms, ok := app.cms.(*rootmulti.Store)
if !ok {
return fmt.Errorf("invalid commit multi-store; expected %T, got: %T", &rootmulti.Store{}, app.cms)
}

Problem Definition

I'm exploring to see how we can update mantlemint to support non-terra chains. Mantlemint uses a different implementation of the CommitMultiStore that is more space efficient and performant for queries.

Seems like the check is unnecessary since there is currently only a single implementation of CommitMultiStore and all of them should adhere to the GetPruning() interface.

Proposal

Remove the interface casting to allow other implementations of a CommitMultiStore.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions