Skip to content

Commit

Permalink
Add RegisterInvariants to Configuration (#273)
Browse files Browse the repository at this point in the history
* adding RegisterInvariants to Configuration

* fixing failed tests

* fix failing tests

* fix lint issues

* add-TallyVotesInvariant

* remove temp

* fix lint issues

* adding invariants

* changes to invariant

* fix lint issues

* addressing requested changes

* "Remove getAllProposals"

* "Remove invariant.go"

* "Change naming conventions"

* "Fix lint issues"

* change naming conventions

* "Change naming conventions"

* Merge branch 'master' into likhita/add-invariants

# Conflicts:
#	go.mod

* Update types/module/server/manager.go

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

* Update types/module/server/manager.go

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

* Update types/module/server/manager.go

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

* Update types/module/server/manager.go

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

* Update types/module/server/manager.go

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

* Update types/module/server/manager.go

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

* Update x/group/server/server.go

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

* Update types/module/server/module.go

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

* Update x/group/server/invariants.go

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

* Update x/group/server/invariants.go

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

* Update x/group/server/invariants.go

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

* Update invariants and fix naming conventions

* update types/module/server/manager.go

* Fix failed tests

* fix failing tests

* fix failed tests

* WIP

* changes to manager

* fix failed tests

* Update invariants in group module

* Update x/group/server/invariants.go

* changes to invariants

* Change naming convention for invariants

* Remove `invariant` as param in types/module/server/testutil.go

* Remove `invar` in  `FixtureFactory`

* Code cleaning

* Implement tallyVotesInvariant without using serverImpl

* invariant test in progress

* invariant test in progress

* Invariants test in progress

* Modify invariants

* change invariants

* invariants test in progress

* fix invariants

* Invariants test added

* update files

* fix failed tests

* fix failed tests

* fix

* fix errors

* fix errors

* Register Invariants in configurator

* remove serverImpl in invariants test

* add table tests for invariants

* change table test name

* change params in tallyVotesInvariant func

* add changes to invariants_test

* update stable_appconfig

* change GroupAccount filed to Address

* address changes

* Update with CacheContext

* remove unnecessary code

* resolve requested changes

* remove redundant return in experimental_appconfig

* address requested changes

* remove AllInvariants function

* changes to invariant

* remove unncessary changes

* add votesInvariant const

* add tallyTotalWeightInvariant

* change naming conventions in tallyTotalWeightInvariant

* fix lint issues

* fix something

* change naming conventions and add improvements to invariants

* fix lint issue

* fix lint issues

* changes in groupTotalWeightInvariant

* code refactoring in invariants_Test

* changes in invariants_test

* remove ReadAll and add LoadNext in invariants

* close iterator

* fix lint issues

* changes to invariants

* use groupIt with LoadNext

* remove unecessary lines

* refactoring code

* refactor code

* fix lint issues

Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
  • Loading branch information
3 people authored Apr 16, 2021
1 parent 1b7c80e commit 40e2a34
Show file tree
Hide file tree
Showing 16 changed files with 595 additions and 66 deletions.
39 changes: 19 additions & 20 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"net/http"
"os"

"github.com/CosmWasm/wasmd/x/wasm"
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/grpc/tmservice"
Expand All @@ -16,29 +17,40 @@ import (
"github.com/cosmos/cosmos-sdk/server/config"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
simappparams "github.com/cosmos/cosmos-sdk/simapp/params"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/cosmos-sdk/version"
"github.com/cosmos/cosmos-sdk/x/auth"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
authrest "github.com/cosmos/cosmos-sdk/x/auth/client/rest"
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation"
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
"github.com/cosmos/cosmos-sdk/x/bank"
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
"github.com/cosmos/cosmos-sdk/x/capability"
capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper"
capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types"
"github.com/cosmos/cosmos-sdk/x/crisis"
crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper"
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"
distr "github.com/cosmos/cosmos-sdk/x/distribution"
distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper"
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
"github.com/cosmos/cosmos-sdk/x/evidence"
evidencekeeper "github.com/cosmos/cosmos-sdk/x/evidence/keeper"
evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types"
"github.com/cosmos/cosmos-sdk/x/genutil"
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"
"github.com/cosmos/cosmos-sdk/x/gov"
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
"github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer"
ibctransferkeeper "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/keeper"
ibctransfertypes "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types"
ibc "github.com/cosmos/cosmos-sdk/x/ibc/core"
ibcclient "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client"
porttypes "github.com/cosmos/cosmos-sdk/x/ibc/core/05-port/types"
Expand All @@ -47,44 +59,30 @@ import (
ibcmock "github.com/cosmos/cosmos-sdk/x/ibc/testing/mock"
"github.com/cosmos/cosmos-sdk/x/mint"
mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper"
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
"github.com/cosmos/cosmos-sdk/x/params"
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper"
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal"
"github.com/cosmos/cosmos-sdk/x/slashing"
slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper"
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
"github.com/cosmos/cosmos-sdk/x/staking"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
"github.com/cosmos/cosmos-sdk/x/upgrade"
upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
"github.com/gorilla/mux"
"github.com/rakyll/statik/fs"
"github.com/regen-network/regen-ledger/types/module/server"
"github.com/spf13/cast"
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/log"
tmos "github.com/tendermint/tendermint/libs/os"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
dbm "github.com/tendermint/tm-db"

// types
sdk "github.com/cosmos/cosmos-sdk/types"
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types"
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types"
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
ibctransfertypes "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types"
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/CosmWasm/wasmd/x/wasm"
"github.com/regen-network/regen-ledger/types/module/server"
)

const (
Expand Down Expand Up @@ -320,6 +318,7 @@ func NewRegenApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest

// register experimental modules here
app.smm = setCustomModules(app, interfaceRegistry)
app.smm.RegisterInvariants(&app.CrisisKeeper)

var skipGenesisInvariants = cast.ToBool(appOpts.Get(crisis.FlagSkipGenesisInvariants))

Expand Down
6 changes: 3 additions & 3 deletions app/experimental_appconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ import (
"github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

distrclient "github.com/cosmos/cosmos-sdk/x/distribution/client"
"github.com/cosmos/cosmos-sdk/x/gov"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
paramsclient "github.com/cosmos/cosmos-sdk/x/params/client"
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper"
upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

moduletypes "github.com/regen-network/regen-ledger/types/module"
"github.com/regen-network/regen-ledger/types/module/server"
data "github.com/regen-network/regen-ledger/x/data/module"
Expand Down
1 change: 1 addition & 0 deletions app/stable_appconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
paramsclient "github.com/cosmos/cosmos-sdk/x/params/client"
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper"
upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client"

"github.com/regen-network/regen-ledger/types/module/server"
)

Expand Down
5 changes: 0 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,6 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
Expand Down Expand Up @@ -884,7 +883,6 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
Expand All @@ -894,7 +892,6 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U=
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
Expand All @@ -903,7 +900,6 @@ gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno=
gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
Expand All @@ -913,7 +909,6 @@ gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
Expand Down
59 changes: 39 additions & 20 deletions types/module/server/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,34 @@ import (

// Manager is the server module manager
type Manager struct {
baseApp *baseapp.BaseApp
cdc *codec.ProtoCodec
keys map[string]ModuleKey
router *router
requiredServices map[reflect.Type]bool
initGenesisHandlers map[string]module.InitGenesisHandler
exportGenesisHandlers map[string]module.ExportGenesisHandler
baseApp *baseapp.BaseApp
cdc *codec.ProtoCodec
keys map[string]ModuleKey
router *router
requiredServices map[reflect.Type]bool
initGenesisHandlers map[string]module.InitGenesisHandler
exportGenesisHandlers map[string]module.ExportGenesisHandler
registerInvariantsHandler map[string]RegisterInvariantsHandler
}

// RegisterInvariants registers all module routes and module querier routes
func (mm *Manager) RegisterInvariants(ir sdk.InvariantRegistry) {
for _, invariant := range mm.registerInvariantsHandler {
if invariant != nil {
invariant(ir)
}
}
}

// NewManager creates a new Manager
func NewManager(baseApp *baseapp.BaseApp, cdc *codec.ProtoCodec) *Manager {
return &Manager{
baseApp: baseApp,
cdc: cdc,
keys: map[string]ModuleKey{},
initGenesisHandlers: map[string]module.InitGenesisHandler{},
exportGenesisHandlers: map[string]module.ExportGenesisHandler{},
baseApp: baseApp,
cdc: cdc,
keys: map[string]ModuleKey{},
registerInvariantsHandler: map[string]RegisterInvariantsHandler{},
initGenesisHandlers: map[string]module.InitGenesisHandler{},
exportGenesisHandlers: map[string]module.ExportGenesisHandler{},
router: &router{
handlers: map[string]handler{},
providedServices: map[reflect.Type]bool{},
Expand Down Expand Up @@ -105,6 +116,7 @@ func (mm *Manager) RegisterModules(modules []module.Module) error {
}

serverMod.RegisterServices(cfg)
mm.registerInvariantsHandler[name] = cfg.registerInvariantsHandler
mm.initGenesisHandlers[name] = cfg.initGenesisHandler
mm.exportGenesisHandlers[name] = cfg.exportGenesisHandler

Expand Down Expand Up @@ -211,15 +223,18 @@ func exportGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, exportGenesisHandle
return genesisData, nil
}

type RegisterInvariantsHandler func(ir sdk.InvariantRegistry)

type configurator struct {
msgServer gogogrpc.Server
queryServer gogogrpc.Server
key *rootModuleKey
cdc codec.Marshaler
requiredServices map[reflect.Type]bool
router sdk.Router
initGenesisHandler module.InitGenesisHandler
exportGenesisHandler module.ExportGenesisHandler
msgServer gogogrpc.Server
queryServer gogogrpc.Server
key *rootModuleKey
cdc codec.Marshaler
requiredServices map[reflect.Type]bool
router sdk.Router
initGenesisHandler module.InitGenesisHandler
exportGenesisHandler module.ExportGenesisHandler
registerInvariantsHandler RegisterInvariantsHandler
}

var _ Configurator = &configurator{}
Expand All @@ -232,6 +247,10 @@ func (c *configurator) QueryServer() gogogrpc.Server {
return c.queryServer
}

func (c *configurator) RegisterInvariantsHandler(registry RegisterInvariantsHandler) {
c.registerInvariantsHandler = registry
}

func (c *configurator) RegisterGenesisHandlers(initGenesisHandler module.InitGenesisHandler, exportGenesisHandler module.ExportGenesisHandler) {
c.initGenesisHandler = initGenesisHandler
c.exportGenesisHandler = exportGenesisHandler
Expand Down
2 changes: 2 additions & 0 deletions types/module/server/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkmodule "github.com/cosmos/cosmos-sdk/types/module"

"github.com/regen-network/regen-ledger/types/module"
)

Expand All @@ -20,6 +21,7 @@ type Configurator interface {
ModuleKey() RootModuleKey
Marshaler() codec.Marshaler
RequireServer(interface{})
RegisterInvariantsHandler(registry RegisterInvariantsHandler)
RegisterGenesisHandlers(module.InitGenesisHandler, module.ExportGenesisHandler)

// Router() is temporarily added here to use in the group module.
Expand Down
3 changes: 1 addition & 2 deletions types/module/server/testutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import (
"fmt"
"testing"

"github.com/regen-network/regen-ledger/testutil"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/codec/types"
Expand All @@ -20,6 +18,7 @@ import (
dbm "github.com/tendermint/tm-db"
"google.golang.org/grpc"

"github.com/regen-network/regen-ledger/testutil"
regentypes "github.com/regen-network/regen-ledger/types"
"github.com/regen-network/regen-ledger/types/module"
)
Expand Down
3 changes: 1 addition & 2 deletions x/data/server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ package server_test
import (
"testing"

"github.com/regen-network/regen-ledger/types/module"

"github.com/stretchr/testify/suite"

"github.com/regen-network/regen-ledger/types/module"
"github.com/regen-network/regen-ledger/types/module/server"
datamodule "github.com/regen-network/regen-ledger/x/data/module"
"github.com/regen-network/regen-ledger/x/data/server/testsuite"
Expand Down
3 changes: 1 addition & 2 deletions x/data/server/testsuite/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ package testsuite
import (
"context"

"github.com/regen-network/regen-ledger/testutil"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/suite"

"github.com/regen-network/regen-ledger/testutil"
"github.com/regen-network/regen-ledger/x/data"
)

Expand Down
3 changes: 2 additions & 1 deletion x/group/client/testsuite/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import (
"fmt"
"strconv"

tmcli "github.com/tendermint/tendermint/libs/cli"

"github.com/regen-network/regen-ledger/testutil/cli"
"github.com/regen-network/regen-ledger/x/group"
"github.com/regen-network/regen-ledger/x/group/client"
tmcli "github.com/tendermint/tendermint/libs/cli"
)

func (s *IntegrationTestSuite) TestQueryGroupInfo() {
Expand Down
8 changes: 3 additions & 5 deletions x/group/client/testsuite/tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,20 @@ import (
"strings"
"testing"

tmcli "github.com/tendermint/tendermint/libs/cli"

"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/crypto/hd"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
"github.com/cosmos/cosmos-sdk/testutil"
sdk "github.com/cosmos/cosmos-sdk/types"
banktestutil "github.com/cosmos/cosmos-sdk/x/bank/client/testutil"
"github.com/gogo/protobuf/proto"
"github.com/stretchr/testify/suite"
tmcli "github.com/tendermint/tendermint/libs/cli"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/regen-network/regen-ledger/testutil/cli"
"github.com/regen-network/regen-ledger/testutil/network"

"github.com/regen-network/regen-ledger/x/group"
"github.com/regen-network/regen-ledger/x/group/client"
"github.com/stretchr/testify/suite"
)

type IntegrationTestSuite struct {
Expand Down
Loading

0 comments on commit 40e2a34

Please sign in to comment.