feat(x/protocolpool,x/distribution)!: remove dependency + fix continuous fund bug (#20790)

This commit is contained in:
Facundo Medica
2024-07-24 15:07:50 +00:00
committed by GitHub
parent 339e26ea8f
commit 0fda53f265
43 changed files with 1582 additions and 489 deletions
@@ -86,11 +86,12 @@ func initFixture(t *testing.T) *fixture {
authority := authtypes.NewModuleAddress("gov")
maccPerms := map[string][]string{
pooltypes.ModuleName: {},
pooltypes.StreamAccount: {},
distrtypes.ModuleName: {authtypes.Minter},
stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking},
stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking},
pooltypes.ModuleName: {},
pooltypes.StreamAccount: {},
pooltypes.ProtocolPoolDistrAccount: {},
distrtypes.ModuleName: {authtypes.Minter},
stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking},
stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking},
}
// gomock initializations
@@ -137,13 +138,13 @@ func initFixture(t *testing.T) *fixture {
poolKeeper := poolkeeper.NewKeeper(cdc, runtime.NewEnvironment(runtime.NewKVStoreService(keys[pooltypes.StoreKey]), log.NewNopLogger()), accountKeeper, bankKeeper, stakingKeeper, authority.String())
distrKeeper := distrkeeper.NewKeeper(
cdc, runtime.NewEnvironment(runtime.NewKVStoreService(keys[distrtypes.StoreKey]), logger), accountKeeper, bankKeeper, stakingKeeper, poolKeeper, cometService, distrtypes.ModuleName, authority.String(),
cdc, runtime.NewEnvironment(runtime.NewKVStoreService(keys[distrtypes.StoreKey]), logger), accountKeeper, bankKeeper, stakingKeeper, cometService, distrtypes.ModuleName, authority.String(),
)
authModule := auth.NewAppModule(cdc, accountKeeper, acctsModKeeper, authsims.RandomGenesisAccounts)
bankModule := bank.NewAppModule(cdc, bankKeeper, accountKeeper)
stakingModule := staking.NewAppModule(cdc, stakingKeeper, accountKeeper, bankKeeper)
distrModule := distribution.NewAppModule(cdc, distrKeeper, accountKeeper, bankKeeper, stakingKeeper, poolKeeper)
distrModule := distribution.NewAppModule(cdc, distrKeeper, accountKeeper, bankKeeper, stakingKeeper)
poolModule := protocolpool.NewAppModule(cdc, poolKeeper, accountKeeper, bankKeeper)
addr := sdk.AccAddress(PKS[0].Address())