chore: use math.Int instead of math.Int and apply linting (#12702)
* linting round * fix changelog * revert docs changes * Update CHANGELOG.md * revert an accidental change to security.md * Update simapp/integration/client/grpc/tmservice/service_test.go Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
co-authored by
Julien Robert
parent
e7bd66841d
commit
5decd22cd3
@@ -4,6 +4,7 @@ import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/math"
|
||||
"github.com/stretchr/testify/require"
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||
@@ -64,7 +65,7 @@ func TestSlashingMsgs(t *testing.T) {
|
||||
commission := stakingtypes.NewCommissionRates(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec())
|
||||
|
||||
createValidatorMsg, err := stakingtypes.NewMsgCreateValidator(
|
||||
sdk.ValAddress(addr1), valKey.PubKey(), bondCoin, description, commission, sdk.OneInt(),
|
||||
sdk.ValAddress(addr1), valKey.PubKey(), bondCoin, description, commission, math.OneInt(),
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -80,7 +81,7 @@ func TestSlashingMsgs(t *testing.T) {
|
||||
validator := checkValidator(t, app, addr1, true)
|
||||
require.Equal(t, sdk.ValAddress(addr1).String(), validator.OperatorAddress)
|
||||
require.Equal(t, stakingtypes.Bonded, validator.Status)
|
||||
require.True(sdk.IntEq(t, bondTokens, validator.BondedTokens()))
|
||||
require.True(math.IntEq(t, bondTokens, validator.BondedTokens()))
|
||||
unjailMsg := &types.MsgUnjail{ValidatorAddr: sdk.ValAddress(addr1).String()}
|
||||
|
||||
checkValidatorSigningInfo(t, app, sdk.ConsAddress(valAddr), true)
|
||||
|
||||
@@ -25,7 +25,7 @@ The slashing module emits the following events:
|
||||
| slash | power | {validatorPower} |
|
||||
| slash | reason | {slashReason} |
|
||||
| slash | jailed [0] | {validatorConsensusAddress} |
|
||||
| slash | burned coins | {sdk.Int} |
|
||||
| slash | burned coins | {math.Int} |
|
||||
|
||||
* [0] Only included if the validator is jailed.
|
||||
|
||||
|
||||
@@ -20,14 +20,14 @@ var (
|
||||
|
||||
// ParamKeyTable for slashing module
|
||||
//
|
||||
// NOTE: Deprecated.
|
||||
// Deprecated.
|
||||
func ParamKeyTable() paramtypes.KeyTable {
|
||||
return paramtypes.NewKeyTable().RegisterParamSet(&Params{})
|
||||
}
|
||||
|
||||
// ParamSetPairs - Implements params.ParamSet
|
||||
//
|
||||
// NOTE: Deprecated.
|
||||
// Deprecated.
|
||||
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs {
|
||||
return paramtypes.ParamSetPairs{
|
||||
paramtypes.NewParamSetPair(KeySignedBlocksWindow, &p.SignedBlocksWindow, validateSignedBlocksWindow),
|
||||
|
||||
Reference in New Issue
Block a user