Skip to content

Commit

Permalink
refactor: fix expected keepers for distribution after collections mig…
Browse files Browse the repository at this point in the history
…ration
  • Loading branch information
julienrbrt committed Aug 2, 2023
1 parent 5b1bdf1 commit 0bd961b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 21 deletions.
17 changes: 12 additions & 5 deletions x/distribution/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,13 +352,20 @@ The transaction fails if the amount cannot be transferred from the sender to the
```go
func (k Keeper) FundCommunityPool(ctx context.Context, amount sdk.Coins, sender sdk.AccAddress) error {
if err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, sender, types.ModuleName, amount); err != nil {
return err
}
if err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, sender, types.ModuleName, amount); err != nil {
return err
}
feePool, err := k.FeePool.Get(ctx)
if err != nil {
return err
}
feePool := k.GetFeePool(ctx)
feePool.CommunityPool = feePool.CommunityPool.Add(sdk.NewDecCoinsFromCoins(amount...)...)
k.SetFeePool(ctx, feePool)
if err := k.FeePool.Set(ctx, feePool); err != nil {
return err
}
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion x/gov/testutil/expected_keepers_mocks.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions x/staking/testutil/expected_keepers_mocks.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion x/staking/types/expected_keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (

// DistributionKeeper expected distribution keeper (noalias)
type DistributionKeeper interface {
GetFeePoolCommunityCoins(ctx context.Context) sdk.DecCoins
GetValidatorOutstandingRewardsCoins(ctx context.Context, val sdk.ValAddress) sdk.DecCoins
}

Expand Down

0 comments on commit 0bd961b

Please sign in to comment.