Skip to content

Commit

Permalink
test: add second pool for some inflation-splitting tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shifty11 committed May 29, 2024
1 parent 9678625 commit 3e15eec
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions x/bundles/keeper/keeper_suite_inflation_splitting_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1435,6 +1435,37 @@ var _ = Describe("inflation splitting", Ordered, func() {
pool.InflationShareWeight = math.LegacyMustNewDecFromStr("0.1")
s.App().PoolKeeper.SetPool(s.Ctx(), pool)

// Add a second pool
gov := s.App().GovKeeper.GetGovernanceAccount(s.Ctx()).GetAddress().String()
msg := &pooltypes.MsgCreatePool{
Authority: gov,
Name: "PoolTest 2",
Runtime: "@kyve/test",
Logo: "ar://Tewyv2P5VEG8EJ6AUQORdqNTectY9hlOrWPK8wwo-aU",
Config: "ar://DgdB-2hLrxjhyEEbCML__dgZN5_uS7T6Z5XDkaFh3P0",
StartKey: "0",
UploadInterval: 60,
InflationShareWeight: math.LegacyMustNewDecFromStr("1"),
MinDelegation: 100 * i.KYVE,
MaxBundleSize: 100,
Version: "0.0.0",
Binaries: "{}",
StorageProviderId: 2,
CompressionId: 1,
}
s.RunTxPoolSuccess(msg)

s.RunTxStakersSuccess(&stakertypes.MsgJoinPool{
Creator: i.STAKER_0,
PoolId: 1,
Valaddress: i.VALADDRESS_0_B,
})
s.RunTxStakersSuccess(&stakertypes.MsgJoinPool{
Creator: i.STAKER_1,
PoolId: 1,
Valaddress: i.VALADDRESS_1_B,
})

// mine some blocks
for i := 1; i < 100; i++ {
s.Commit()
Expand Down Expand Up @@ -1532,6 +1563,37 @@ var _ = Describe("inflation splitting", Ordered, func() {
pool.InflationShareWeight = math.LegacyMustNewDecFromStr("1")
s.App().PoolKeeper.SetPool(s.Ctx(), pool)

// Add a second pool
gov := s.App().GovKeeper.GetGovernanceAccount(s.Ctx()).GetAddress().String()
msg := &pooltypes.MsgCreatePool{
Authority: gov,
Name: "PoolTest 2",
Runtime: "@kyve/test",
Logo: "ar://Tewyv2P5VEG8EJ6AUQORdqNTectY9hlOrWPK8wwo-aU",
Config: "ar://DgdB-2hLrxjhyEEbCML__dgZN5_uS7T6Z5XDkaFh3P0",
StartKey: "0",
UploadInterval: 60,
InflationShareWeight: math.LegacyMustNewDecFromStr("1"),
MinDelegation: 100 * i.KYVE,
MaxBundleSize: 100,
Version: "0.0.0",
Binaries: "{}",
StorageProviderId: 2,
CompressionId: 1,
}
s.RunTxPoolSuccess(msg)

s.RunTxStakersSuccess(&stakertypes.MsgJoinPool{
Creator: i.STAKER_0,
PoolId: 1,
Valaddress: i.VALADDRESS_0_B,
})
s.RunTxStakersSuccess(&stakertypes.MsgJoinPool{
Creator: i.STAKER_1,
PoolId: 1,
Valaddress: i.VALADDRESS_1_B,
})

// mine some blocks
for i := 1; i < 100; i++ {
s.Commit()
Expand Down

0 comments on commit 3e15eec

Please sign in to comment.