refactor!: deprecate blocktime on context (#17738)

This commit is contained in:
Marko
2023-09-18 13:55:21 +00:00
committed by GitHub
parent 8df065b611
commit 6615ff4f76
89 changed files with 379 additions and 369 deletions
+2 -2
View File
@@ -221,7 +221,7 @@ func SimulateMsgEditValidator(
address := val.GetOperator()
newCommissionRate := simtypes.RandomDecAmount(r, val.Commission.MaxRate)
if err := val.Commission.ValidateNewRate(newCommissionRate, ctx.BlockHeader().Time); err != nil {
if err := val.Commission.ValidateNewRate(newCommissionRate, ctx.HeaderInfo().Time); err != nil {
// skip as the commission is invalid
return simtypes.NoOpMsg(types.ModuleName, msgType, "invalid commission rate"), nil, nil
}
@@ -517,7 +517,7 @@ func SimulateMsgCancelUnbondingDelegate(
}
}
if unbondingDelegationEntry.CompletionTime.Before(ctx.BlockTime()) {
if unbondingDelegationEntry.CompletionTime.Before(ctx.HeaderInfo().Time) {
return simtypes.NoOpMsg(types.ModuleName, msgType, "unbonding delegation is already processed"), nil, nil
}