Skip to content

Commit

Permalink
Fix minting param initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
ValarDragon committed Feb 24, 2022
1 parent 50876d4 commit 97587eb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions x/superfluid/keeper/epoch.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, _ int64) {
}

// This gets called in BeginBlock, on blocks where an epoch ended.
func (k Keeper) AfterEpochStartBeginBlock(ctx sdk.Context) {
// cref [#830](https://github.com/osmosis-labs/osmosis/issues/830),
// the supplied epoch number is wrong at time of commit. hence we get from the info.
Expand Down
11 changes: 11 additions & 0 deletions x/superfluid/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (

"github.com/osmosis-labs/osmosis/v7/x/gamm/pool-models/balancer"
gammtypes "github.com/osmosis-labs/osmosis/v7/x/gamm/types"
minttypes "github.com/osmosis-labs/osmosis/v7/x/mint/types"
"github.com/tendermint/tendermint/crypto/ed25519"

epochtypes "github.com/osmosis-labs/osmosis/v7/x/epochs/types"
Expand Down Expand Up @@ -65,6 +66,16 @@ func (suite *KeeperTestSuite) SetupTest() {
CurrentEpoch: 1,
EpochCountingStarted: true,
})

mintParams := suite.app.MintKeeper.GetParams(suite.ctx)
mintParams.DistributionProportions = minttypes.DistributionProportions{
Staking: sdk.OneDec(),
PoolIncentives: sdk.ZeroDec(),
DeveloperRewards: sdk.ZeroDec(),
CommunityPool: sdk.ZeroDec(),
}
suite.app.MintKeeper.SetParams(suite.ctx, mintParams)
suite.app.MintKeeper.SetMinter(suite.ctx, minttypes.NewMinter(sdk.NewDec(1_000_000)))
}

func (suite *KeeperTestSuite) SetupDefaultPool() {
Expand Down

0 comments on commit 97587eb

Please sign in to comment.