refactor: remove sdk dep from store (#14603)
Co-authored-by: Likhita Polavarapu <78951027+likhita-809@users.noreply.github.com>
This commit is contained in:
parent
fa7ff32f35
commit
a2eb630906
@ -213,6 +213,7 @@ extension interfaces. `module.Manager.Modules` is now of type `map[string]interf
|
||||
* (x/auth)[#13780](https://github.com/cosmos/cosmos-sdk/pull/13780) Querying with `id` (type of int64) in `AccountAddressByID` grpc query now throws error, use account-id(type of uint64) instead.
|
||||
* (snapshots) [14048](https://github.com/cosmos/cosmos-sdk/pull/14048) Move the Snapshot package to the store package. This is done in an effort group all storage related logic under one package.
|
||||
* (baseapp) [#14050](https://github.com/cosmos/cosmos-sdk/pull/14050) refactor `ABCIListener` interface to accept go contexts
|
||||
* (store/streaming)[#14603](https://github.com/cosmos/cosmos-sdk/pull/14603) `StoreDecoderRegistry` moved from store to `types/simulations` this breaks the `AppModuleSimulation` interface.
|
||||
|
||||
### CLI Breaking Changes
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ import (
|
||||
"io"
|
||||
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
"github.com/cosmos/cosmos-sdk/codec/types"
|
||||
servertypes "github.com/cosmos/cosmos-sdk/server/types"
|
||||
"github.com/cosmos/cosmos-sdk/store/metrics"
|
||||
@ -15,6 +16,7 @@ import (
|
||||
storetypes "github.com/cosmos/cosmos-sdk/store/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/mempool"
|
||||
"github.com/spf13/cast"
|
||||
)
|
||||
|
||||
// File for storing in-package BaseApp optional functions,
|
||||
@ -239,7 +241,8 @@ func (app *BaseApp) SetStreamingService(
|
||||
appCodec storetypes.Codec,
|
||||
keys map[string]*storetypes.KVStoreKey,
|
||||
) error {
|
||||
streamers, _, err := streaming.LoadStreamingServices(appOpts, appCodec, app.logger, keys)
|
||||
homePath := cast.ToString(appOpts.Get(flags.FlagHome))
|
||||
streamers, _, err := streaming.LoadStreamingServices(appOpts, appCodec, app.logger, keys, homePath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -188,6 +188,7 @@ replace (
|
||||
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
|
||||
// Simapp always use the latest version of the cosmos-sdk
|
||||
github.com/cosmos/cosmos-sdk => ../.
|
||||
github.com/cosmos/cosmos-sdk/x/nft => ../x/nft
|
||||
// Fix upstream GHSA-h395-qcrw-5vmq vulnerability.
|
||||
// TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409
|
||||
github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.8.1
|
||||
|
||||
@ -7,6 +7,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/store/dbadapter"
|
||||
"github.com/cosmos/cosmos-sdk/store/internal/kv"
|
||||
"github.com/cosmos/cosmos-sdk/store/listenkv"
|
||||
"github.com/cosmos/cosmos-sdk/store/prefix"
|
||||
"github.com/cosmos/cosmos-sdk/store/types"
|
||||
@ -21,7 +22,7 @@ func bz(s string) []byte { return []byte(s) }
|
||||
func keyFmt(i int) []byte { return bz(fmt.Sprintf("key%0.8d", i)) }
|
||||
func valFmt(i int) []byte { return bz(fmt.Sprintf("value%0.8d", i)) }
|
||||
|
||||
var kvPairs = []types.KVPair{
|
||||
var kvPairs = []kv.Pair{
|
||||
{Key: keyFmt(1), Value: valFmt(1)},
|
||||
{Key: keyFmt(2), Value: valFmt(2)},
|
||||
{Key: keyFmt(3), Value: valFmt(3)},
|
||||
|
||||
@ -13,7 +13,6 @@ type (
|
||||
CacheMultiStore = types.CacheMultiStore
|
||||
CommitMultiStore = types.CommitMultiStore
|
||||
KVStore = types.KVStore
|
||||
KVPair = types.KVPair
|
||||
Iterator = types.Iterator
|
||||
CacheKVStore = types.CacheKVStore
|
||||
CommitKVStore = types.CommitKVStore
|
||||
|
||||
@ -7,8 +7,6 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
serverTypes "github.com/cosmos/cosmos-sdk/server/types"
|
||||
"github.com/cosmos/cosmos-sdk/store/streaming/file"
|
||||
"github.com/cosmos/cosmos-sdk/store/types"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
@ -16,8 +14,14 @@ import (
|
||||
"github.com/spf13/cast"
|
||||
)
|
||||
|
||||
// ServiceConstructor is used to construct a streaming service
|
||||
type ServiceConstructor func(serverTypes.AppOptions, []types.StoreKey, types.Codec, log.Logger) (types.StreamingService, error)
|
||||
type (
|
||||
// AppOptions is an interface for accessing application options
|
||||
AppOptions interface {
|
||||
Get(string) interface{}
|
||||
}
|
||||
// ServiceConstructor is used to construct a streaming service
|
||||
ServiceConstructor func(AppOptions, []types.StoreKey, types.Codec, log.Logger, string) (types.StreamingService, error)
|
||||
)
|
||||
|
||||
// ServiceType enum for specifying the type of StreamingService
|
||||
type ServiceType int
|
||||
@ -85,12 +89,12 @@ func NewServiceConstructor(name string) (ServiceConstructor, error) {
|
||||
// NewFileStreamingService is the streaming.ServiceConstructor function for
|
||||
// creating a FileStreamingService.
|
||||
func NewFileStreamingService(
|
||||
opts serverTypes.AppOptions,
|
||||
opts AppOptions,
|
||||
keys []types.StoreKey,
|
||||
marshaller types.Codec,
|
||||
logger log.Logger,
|
||||
homePath string,
|
||||
) (types.StreamingService, error) {
|
||||
homePath := cast.ToString(opts.Get(flags.FlagHome))
|
||||
filePrefix := cast.ToString(opts.Get(OptStreamersFilePrefix))
|
||||
fileDir := cast.ToString(opts.Get(OptStreamersFileWriteDir))
|
||||
outputMetadata := cast.ToBool(opts.Get(OptStreamersFileOutputMetadata))
|
||||
@ -117,10 +121,11 @@ func NewFileStreamingService(
|
||||
// WaitGroup and quit channel used to synchronize with the streaming services
|
||||
// and any error that occurs during the setup.
|
||||
func LoadStreamingServices(
|
||||
appOpts serverTypes.AppOptions,
|
||||
appOpts AppOptions,
|
||||
appCodec types.Codec,
|
||||
logger log.Logger,
|
||||
keys map[string]*types.KVStoreKey,
|
||||
homePath string,
|
||||
) ([]types.StreamingService, *sync.WaitGroup, error) {
|
||||
// waitgroup and quit channel for optional shutdown coordination of the streaming service(s)
|
||||
wg := new(sync.WaitGroup)
|
||||
@ -167,7 +172,7 @@ func LoadStreamingServices(
|
||||
|
||||
// Generate the streaming service using the constructor, appOptions, and the
|
||||
// StoreKeys we want to expose.
|
||||
streamingService, err := constructor(appOpts, exposeStoreKeys, appCodec, logger)
|
||||
streamingService, err := constructor(appOpts, exposeStoreKeys, appCodec, logger, homePath)
|
||||
if err != nil {
|
||||
// Close any services we may have already spun up before hitting the error
|
||||
// on this one.
|
||||
|
||||
@ -6,7 +6,6 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
|
||||
serverTypes "github.com/cosmos/cosmos-sdk/server/types"
|
||||
"github.com/cosmos/cosmos-sdk/store/streaming"
|
||||
"github.com/cosmos/cosmos-sdk/store/streaming/file"
|
||||
"github.com/cosmos/cosmos-sdk/store/types"
|
||||
@ -36,7 +35,7 @@ func TestStreamingServiceConstructor(t *testing.T) {
|
||||
var expectedType streaming.ServiceConstructor
|
||||
require.IsType(t, expectedType, constructor)
|
||||
|
||||
serv, err := constructor(mockOptions, mockKeys, testMarshaller, log.NewNopLogger())
|
||||
serv, err := constructor(mockOptions, mockKeys, testMarshaller, log.NewNopLogger(), "path/to/data")
|
||||
require.Nil(t, err)
|
||||
require.IsType(t, &file.StreamingService{}, serv)
|
||||
listeners := serv.Listeners()
|
||||
@ -51,7 +50,7 @@ func TestLoadStreamingServices(t *testing.T) {
|
||||
keys := types.NewKVStoreKeys("mockKey1", "mockKey2")
|
||||
|
||||
testCases := map[string]struct {
|
||||
appOpts serverTypes.AppOptions
|
||||
appOpts streaming.AppOptions
|
||||
activeStreamersLen int
|
||||
}{
|
||||
"empty app options": {
|
||||
@ -72,7 +71,7 @@ func TestLoadStreamingServices(t *testing.T) {
|
||||
|
||||
for name, tc := range testCases {
|
||||
t.Run(name, func(t *testing.T) {
|
||||
activeStreamers, _, err := streaming.LoadStreamingServices(tc.appOpts, encCdc, log.NewNopLogger(), keys)
|
||||
activeStreamers, _, err := streaming.LoadStreamingServices(tc.appOpts, encCdc, log.NewNopLogger(), keys, "path/to/data")
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, tc.activeStreamersLen, len(activeStreamers))
|
||||
})
|
||||
|
||||
@ -11,6 +11,7 @@ import (
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/store/dbadapter"
|
||||
"github.com/cosmos/cosmos-sdk/store/internal/kv"
|
||||
"github.com/cosmos/cosmos-sdk/store/prefix"
|
||||
"github.com/cosmos/cosmos-sdk/store/tracekv"
|
||||
"github.com/cosmos/cosmos-sdk/store/types"
|
||||
@ -21,7 +22,7 @@ func bz(s string) []byte { return []byte(s) }
|
||||
func keyFmt(i int) []byte { return bz(fmt.Sprintf("key%0.8d", i)) }
|
||||
func valFmt(i int) []byte { return bz(fmt.Sprintf("value%0.8d", i)) }
|
||||
|
||||
var kvPairs = []types.KVPair{
|
||||
var kvPairs = []kv.Pair{
|
||||
{Key: keyFmt(1), Value: valFmt(1)},
|
||||
{Key: keyFmt(2), Value: valFmt(2)},
|
||||
{Key: keyFmt(3), Value: valFmt(3)},
|
||||
|
||||
@ -10,7 +10,6 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/store/metrics"
|
||||
pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types"
|
||||
snapshottypes "github.com/cosmos/cosmos-sdk/store/snapshots/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/kv"
|
||||
)
|
||||
|
||||
type Store interface {
|
||||
@ -433,11 +432,6 @@ func (key *MemoryStoreKey) String() string {
|
||||
|
||||
//----------------------------------------
|
||||
|
||||
// key-value result for iterator queries
|
||||
type KVPair kv.Pair
|
||||
|
||||
//----------------------------------------
|
||||
|
||||
// TraceContext contains TraceKVStore context data. It will be written with
|
||||
// every trace operation.
|
||||
type TraceContext map[string]interface{}
|
||||
@ -514,7 +508,3 @@ func NewMemoryStoreKeys(names ...string) map[string]*MemoryStoreKey {
|
||||
|
||||
return keys
|
||||
}
|
||||
|
||||
// StoreDecoderRegistry defines each of the modules store decoders. Used for ImportExport
|
||||
// simulation.
|
||||
type StoreDecoderRegistry map[string]func(kvA, kvB kv.Pair) string
|
||||
|
||||
@ -184,6 +184,7 @@ replace (
|
||||
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
|
||||
// We always want to test against the latest version of the SDK.
|
||||
github.com/cosmos/cosmos-sdk => ../.
|
||||
github.com/cosmos/cosmos-sdk/x/nft => ../x/nft
|
||||
// Fix upstream GHSA-h395-qcrw-5vmq vulnerability.
|
||||
// TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409
|
||||
github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.8.1
|
||||
|
||||
@ -109,7 +109,7 @@ func PrintStats(db dbm.DB) {
|
||||
|
||||
// GetSimulationLog unmarshals the KVPair's Value to the corresponding type based on the
|
||||
// each's module store key and the prefix bytes of the KVPair's key.
|
||||
func GetSimulationLog(storeName string, sdr storetypes.StoreDecoderRegistry, kvAs, kvBs []kv.Pair) (log string) {
|
||||
func GetSimulationLog(storeName string, sdr simtypes.StoreDecoderRegistry, kvAs, kvBs []kv.Pair) (log string) {
|
||||
for i := 0; i < len(kvAs); i++ {
|
||||
if len(kvAs[i].Value) == 0 && len(kvBs[i].Value) == 0 {
|
||||
// skip if the value doesn't have any bytes
|
||||
|
||||
@ -15,12 +15,13 @@ import (
|
||||
|
||||
storetypes "github.com/cosmos/cosmos-sdk/store/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/kv"
|
||||
"github.com/cosmos/cosmos-sdk/types/simulation"
|
||||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||
)
|
||||
|
||||
func TestGetSimulationLog(t *testing.T) {
|
||||
legacyAmino := codec.NewLegacyAmino()
|
||||
decoders := make(storetypes.StoreDecoderRegistry)
|
||||
decoders := make(simulation.StoreDecoderRegistry)
|
||||
decoders[authtypes.StoreKey] = func(kvAs, kvBs kv.Pair) string { return "10" }
|
||||
|
||||
tests := []struct {
|
||||
|
||||
@ -8,7 +8,6 @@ import (
|
||||
|
||||
sdkmath "cosmossdk.io/math"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
storetypes "github.com/cosmos/cosmos-sdk/store/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/simulation"
|
||||
)
|
||||
|
||||
@ -22,7 +21,7 @@ type AppModuleSimulation interface {
|
||||
ProposalContents(simState SimulationState) []simulation.WeightedProposalContent
|
||||
|
||||
// register a func to decode the each module's defined types from their corresponding store key
|
||||
RegisterStoreDecoder(storetypes.StoreDecoderRegistry)
|
||||
RegisterStoreDecoder(simulation.StoreDecoderRegistry)
|
||||
|
||||
// simulation operations (i.e msgs) with their respective weight
|
||||
WeightedOperations(simState SimulationState) []simulation.WeightedOperation
|
||||
@ -32,7 +31,7 @@ type AppModuleSimulation interface {
|
||||
// for managing and executing simulation functionalities for a group of modules
|
||||
type SimulationManager struct {
|
||||
Modules []AppModuleSimulation // array of app modules; we use an array for deterministic simulation tests
|
||||
StoreDecoders storetypes.StoreDecoderRegistry // functions to decode the key-value pairs from each module's store
|
||||
StoreDecoders simulation.StoreDecoderRegistry // functions to decode the key-value pairs from each module's store
|
||||
}
|
||||
|
||||
// NewSimulationManager creates a new SimulationManager object
|
||||
@ -41,7 +40,7 @@ type SimulationManager struct {
|
||||
func NewSimulationManager(modules ...AppModuleSimulation) *SimulationManager {
|
||||
return &SimulationManager{
|
||||
Modules: modules,
|
||||
StoreDecoders: make(storetypes.StoreDecoderRegistry),
|
||||
StoreDecoders: make(simulation.StoreDecoderRegistry),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/baseapp"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/kv"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"
|
||||
)
|
||||
|
||||
@ -172,3 +173,7 @@ type Params interface {
|
||||
LivenessTransitionMatrix() TransitionMatrix
|
||||
BlockSizeTransitionMatrix() TransitionMatrix
|
||||
}
|
||||
|
||||
// StoreDecoderRegistry defines each of the modules store decoders. Used for ImportExport
|
||||
// simulation.
|
||||
type StoreDecoderRegistry map[string]func(kvA, kvB kv.Pair) string
|
||||
|
||||
@ -184,7 +184,7 @@ func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.We
|
||||
}
|
||||
|
||||
// RegisterStoreDecoder registers a decoder for auth module's types
|
||||
func (am AppModule) RegisterStoreDecoder(sdr store.StoreDecoderRegistry) {
|
||||
func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) {
|
||||
sdr[types.StoreKey] = simulation.NewDecodeStore(am.accountKeeper)
|
||||
}
|
||||
|
||||
|
||||
@ -213,7 +213,7 @@ func (am AppModule) ProposalContents(simState module.SimulationState) []simtypes
|
||||
}
|
||||
|
||||
// RegisterStoreDecoder registers a decoder for authz module's types
|
||||
func (am AppModule) RegisterStoreDecoder(sdr store.StoreDecoderRegistry) {
|
||||
func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) {
|
||||
sdr[keeper.StoreKey] = simulation.NewDecodeStore(am.cdc)
|
||||
}
|
||||
|
||||
|
||||
@ -188,7 +188,7 @@ func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedP
|
||||
}
|
||||
|
||||
// RegisterStoreDecoder registers a decoder for supply module's types
|
||||
func (am AppModule) RegisterStoreDecoder(_ store.StoreDecoderRegistry) {}
|
||||
func (am AppModule) RegisterStoreDecoder(_ simtypes.StoreDecoderRegistry) {}
|
||||
|
||||
// WeightedOperations returns the all the gov module operations with their respective weights.
|
||||
func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation {
|
||||
|
||||
@ -168,7 +168,7 @@ func (am AppModule) ProposalContents(simState module.SimulationState) []simtypes
|
||||
}
|
||||
|
||||
// RegisterStoreDecoder registers a decoder for capability module's types
|
||||
func (am AppModule) RegisterStoreDecoder(sdr store.StoreDecoderRegistry) {
|
||||
func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) {
|
||||
sdr[types.StoreKey] = simulation.NewDecodeStore(am.cdc)
|
||||
}
|
||||
|
||||
|
||||
@ -191,7 +191,7 @@ func (am AppModule) ProposalContents(simState module.SimulationState) []simtypes
|
||||
}
|
||||
|
||||
// RegisterStoreDecoder registers a decoder for distribution module's types
|
||||
func (am AppModule) RegisterStoreDecoder(sdr store.StoreDecoderRegistry) {
|
||||
func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) {
|
||||
sdr[types.StoreKey] = simulation.NewDecodeStore(am.cdc)
|
||||
}
|
||||
|
||||
|
||||
@ -183,7 +183,7 @@ func (am AppModule) ProposalContents(simState module.SimulationState) []simtypes
|
||||
}
|
||||
|
||||
// RegisterStoreDecoder registers a decoder for evidence module's types
|
||||
func (am AppModule) RegisterStoreDecoder(sdr store.StoreDecoderRegistry) {
|
||||
func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) {
|
||||
sdr[types.StoreKey] = simulation.NewDecodeStore(am.keeper)
|
||||
}
|
||||
|
||||
|
||||
@ -214,7 +214,7 @@ func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.We
|
||||
}
|
||||
|
||||
// RegisterStoreDecoder registers a decoder for feegrant module's types
|
||||
func (am AppModule) RegisterStoreDecoder(sdr store.StoreDecoderRegistry) {
|
||||
func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) {
|
||||
sdr[feegrant.StoreKey] = simulation.NewDecodeStore(am.cdc)
|
||||
}
|
||||
|
||||
|
||||
@ -336,7 +336,7 @@ func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.We
|
||||
}
|
||||
|
||||
// RegisterStoreDecoder registers a decoder for gov module's types
|
||||
func (am AppModule) RegisterStoreDecoder(sdr store.StoreDecoderRegistry) {
|
||||
func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) {
|
||||
sdr[govtypes.StoreKey] = simulation.NewDecodeStore(am.cdc)
|
||||
}
|
||||
|
||||
|
||||
@ -179,7 +179,7 @@ func (am AppModule) ProposalContents(simState module.SimulationState) []simtypes
|
||||
}
|
||||
|
||||
// RegisterStoreDecoder registers a decoder for group module's types
|
||||
func (am AppModule) RegisterStoreDecoder(sdr store.StoreDecoderRegistry) {
|
||||
func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) {
|
||||
sdr[group.StoreKey] = simulation.NewDecodeStore(am.cdc)
|
||||
}
|
||||
|
||||
|
||||
@ -196,7 +196,7 @@ func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.We
|
||||
}
|
||||
|
||||
// RegisterStoreDecoder registers a decoder for mint module's types.
|
||||
func (am AppModule) RegisterStoreDecoder(sdr store.StoreDecoderRegistry) {
|
||||
func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) {
|
||||
sdr[types.StoreKey] = simulation.NewDecodeStore(am.cdc)
|
||||
}
|
||||
|
||||
|
||||
@ -168,7 +168,7 @@ func (am AppModule) ProposalContents(simState module.SimulationState) []simtypes
|
||||
}
|
||||
|
||||
// RegisterStoreDecoder registers a decoder for nft module's types
|
||||
func (am AppModule) RegisterStoreDecoder(sdr store.StoreDecoderRegistry) {
|
||||
func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) {
|
||||
sdr[keeper.StoreKey] = simulation.NewDecodeStore(am.cdc)
|
||||
}
|
||||
|
||||
|
||||
@ -120,7 +120,7 @@ func (am AppModule) ProposalContents(simState module.SimulationState) []simtypes
|
||||
}
|
||||
|
||||
// RegisterStoreDecoder doesn't register any type.
|
||||
func (AppModule) RegisterStoreDecoder(sdr store.StoreDecoderRegistry) {}
|
||||
func (AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) {}
|
||||
|
||||
// WeightedOperations returns the all the gov module operations with their respective weights.
|
||||
func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation {
|
||||
|
||||
@ -187,7 +187,7 @@ func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.We
|
||||
}
|
||||
|
||||
// RegisterStoreDecoder registers a decoder for slashing module's types
|
||||
func (am AppModule) RegisterStoreDecoder(sdr store.StoreDecoderRegistry) {
|
||||
func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) {
|
||||
sdr[types.StoreKey] = simulation.NewDecodeStore(am.cdc)
|
||||
}
|
||||
|
||||
|
||||
@ -294,7 +294,7 @@ func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.We
|
||||
}
|
||||
|
||||
// RegisterStoreDecoder registers a decoder for staking module's types
|
||||
func (am AppModule) RegisterStoreDecoder(sdr store.StoreDecoderRegistry) {
|
||||
func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) {
|
||||
sdr[types.StoreKey] = simulation.NewDecodeStore(am.cdc)
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user