feat!: Comet v0.38 Integration (#15519)
Co-authored-by: marbar3778 <marbar3778@yahoo.com> Co-authored-by: cool-developer <51834436+cool-develope@users.noreply.github.com> Co-authored-by: Aaron Craelius <aaron@regen.network> Co-authored-by: Matt Kocubinski <mkocubinski@gmail.com> Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
co-authored by
marbar3778
cool-developer
Aaron Craelius
Matt Kocubinski
Julien Robert
parent
166be3766b
commit
6cee22df52
@@ -167,8 +167,7 @@ func (s *SimTestSuite) TestWeightedOperations() {
|
||||
// Abonormal scenarios, where the message are created by an errors are not tested here.
|
||||
func (s *SimTestSuite) TestSimulateMsgCreateValidator() {
|
||||
require := s.Require()
|
||||
// begin a new block
|
||||
s.app.BeginBlock(abci.RequestBeginBlock{Header: cmtproto.Header{Height: s.app.LastBlockHeight() + 1, AppHash: s.app.LastCommitID().Hash}})
|
||||
s.app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: s.app.LastBlockHeight() + 1, Hash: s.app.LastCommitID().Hash})
|
||||
|
||||
// execute operation
|
||||
op := simulation.SimulateMsgCreateValidator(s.txConfig, s.accountKeeper, s.bankKeeper, s.stakingKeeper)
|
||||
@@ -208,12 +207,11 @@ func (s *SimTestSuite) TestSimulateMsgCancelUnbondingDelegation() {
|
||||
s.setupValidatorRewards(ctx, validator0.GetOperator())
|
||||
|
||||
// unbonding delegation
|
||||
udb := types.NewUnbondingDelegation(delegator.Address, validator0.GetOperator(), s.app.LastBlockHeight(), blockTime.Add(2*time.Minute), delTokens, 0)
|
||||
udb := types.NewUnbondingDelegation(delegator.Address, validator0.GetOperator(), s.app.LastBlockHeight()+1, blockTime.Add(2*time.Minute), delTokens, 0)
|
||||
s.stakingKeeper.SetUnbondingDelegation(ctx, udb)
|
||||
s.setupValidatorRewards(ctx, validator0.GetOperator())
|
||||
|
||||
// begin a new block
|
||||
s.app.BeginBlock(abci.RequestBeginBlock{Header: cmtproto.Header{Height: s.app.LastBlockHeight() + 1, AppHash: s.app.LastCommitID().Hash, Time: blockTime}})
|
||||
s.app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: s.app.LastBlockHeight() + 1, Hash: s.app.LastCommitID().Hash, Time: blockTime})
|
||||
|
||||
// execute operation
|
||||
op := simulation.SimulateMsgCancelUnbondingDelegate(s.txConfig, s.accountKeeper, s.bankKeeper, s.stakingKeeper)
|
||||
@@ -241,8 +239,7 @@ func (s *SimTestSuite) TestSimulateMsgEditValidator() {
|
||||
// setup accounts[0] as validator
|
||||
_ = s.getTestingValidator0(ctx)
|
||||
|
||||
// begin a new block
|
||||
s.app.BeginBlock(abci.RequestBeginBlock{Header: cmtproto.Header{Height: s.app.LastBlockHeight() + 1, AppHash: s.app.LastCommitID().Hash, Time: blockTime}})
|
||||
s.app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: s.app.LastBlockHeight() + 1, Hash: s.app.LastCommitID().Hash, Time: blockTime})
|
||||
|
||||
// execute operation
|
||||
op := simulation.SimulateMsgEditValidator(s.txConfig, s.accountKeeper, s.bankKeeper, s.stakingKeeper)
|
||||
@@ -301,8 +298,7 @@ func (s *SimTestSuite) TestSimulateMsgUndelegate() {
|
||||
|
||||
s.setupValidatorRewards(ctx, validator0.GetOperator())
|
||||
|
||||
// begin a new block
|
||||
s.app.BeginBlock(abci.RequestBeginBlock{Header: cmtproto.Header{Height: s.app.LastBlockHeight() + 1, AppHash: s.app.LastCommitID().Hash, Time: blockTime}})
|
||||
s.app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: s.app.LastBlockHeight() + 1, Hash: s.app.LastCommitID().Hash, Time: blockTime})
|
||||
|
||||
// execute operation
|
||||
op := simulation.SimulateMsgUndelegate(s.txConfig, s.accountKeeper, s.bankKeeper, s.stakingKeeper)
|
||||
@@ -344,8 +340,7 @@ func (s *SimTestSuite) TestSimulateMsgBeginRedelegate() {
|
||||
s.setupValidatorRewards(ctx, validator0.GetOperator())
|
||||
s.setupValidatorRewards(ctx, validator1.GetOperator())
|
||||
|
||||
// begin a new block
|
||||
s.app.BeginBlock(abci.RequestBeginBlock{Header: cmtproto.Header{Height: s.app.LastBlockHeight() + 1, AppHash: s.app.LastCommitID().Hash, Time: blockTime}})
|
||||
s.app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: s.app.LastBlockHeight() + 1, Hash: s.app.LastCommitID().Hash, Time: blockTime})
|
||||
|
||||
// execute operation
|
||||
op := simulation.SimulateMsgBeginRedelegate(s.txConfig, s.accountKeeper, s.bankKeeper, s.stakingKeeper)
|
||||
|
||||
Reference in New Issue
Block a user