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
@@ -31,7 +31,6 @@ type IntegrationTestSuite struct {
|
||||
}
|
||||
|
||||
func TestIntegrationTestSuite(t *testing.T) {
|
||||
//t.Skip() // to be re-enabled in https://github.com/cosmos/cosmos-sdk/pull/12482/
|
||||
|
||||
suite.Run(t, new(IntegrationTestSuite))
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"cosmossdk.io/math"
|
||||
"github.com/spf13/cobra"
|
||||
tmconfig "github.com/tendermint/tendermint/config"
|
||||
tmos "github.com/tendermint/tendermint/libs/os"
|
||||
@@ -297,7 +298,7 @@ func initTestnetFiles(
|
||||
sdk.NewCoin(sdk.DefaultBondDenom, valTokens),
|
||||
stakingtypes.NewDescription(nodeDirName, "", "", "", ""),
|
||||
stakingtypes.NewCommissionRates(sdk.OneDec(), sdk.OneDec(), sdk.OneDec()),
|
||||
sdk.OneInt(),
|
||||
math.OneInt(),
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
+4
-4
@@ -11,7 +11,7 @@ import (
|
||||
tmjson "github.com/tendermint/tendermint/libs/json"
|
||||
tmtypes "github.com/tendermint/tendermint/types"
|
||||
|
||||
sdkmath "cosmossdk.io/math"
|
||||
"cosmossdk.io/math"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
|
||||
simappparams "github.com/cosmos/cosmos-sdk/simapp/params"
|
||||
@@ -88,7 +88,7 @@ func AppStateFn(cdc codec.JSONCodec, simManager *module.SimulationManager) simty
|
||||
panic(err)
|
||||
}
|
||||
// compute not bonded balance
|
||||
notBondedTokens := sdk.ZeroInt()
|
||||
notBondedTokens := math.ZeroInt()
|
||||
for _, val := range stakingState.Validators {
|
||||
if val.Status != stakingtypes.Unbonded {
|
||||
continue
|
||||
@@ -149,11 +149,11 @@ func AppStateRandomizedFn(
|
||||
// number of bonded accounts
|
||||
var (
|
||||
numInitiallyBonded int64
|
||||
initialStake sdkmath.Int
|
||||
initialStake math.Int
|
||||
)
|
||||
appParams.GetOrGenerate(
|
||||
cdc, simappparams.StakePerAccount, &initialStake, r,
|
||||
func(r *rand.Rand) { initialStake = sdkmath.NewInt(r.Int63n(1e12)) },
|
||||
func(r *rand.Rand) { initialStake = math.NewInt(r.Int63n(1e12)) },
|
||||
)
|
||||
appParams.GetOrGenerate(
|
||||
cdc, simappparams.InitiallyBondedValidators, &numInitiallyBonded, r,
|
||||
|
||||
@@ -25,7 +25,6 @@ import (
|
||||
pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types"
|
||||
"github.com/cosmos/cosmos-sdk/server"
|
||||
"github.com/cosmos/cosmos-sdk/server/types"
|
||||
servertypes "github.com/cosmos/cosmos-sdk/server/types"
|
||||
simappparams "github.com/cosmos/cosmos-sdk/simapp/params"
|
||||
"github.com/cosmos/cosmos-sdk/testutil/mock"
|
||||
"github.com/cosmos/cosmos-sdk/testutil/network"
|
||||
@@ -366,7 +365,7 @@ func NewTestNetworkFixture() network.TestFixture {
|
||||
Amino: encodingCfg.Amino,
|
||||
InterfaceRegistry: encodingCfg.InterfaceRegistry,
|
||||
}
|
||||
appCtr := func(val testutil.Validator) servertypes.Application {
|
||||
appCtr := func(val testutil.Validator) types.Application {
|
||||
return NewSimApp(
|
||||
val.GetCtx().Logger, dbm.NewMemDB(), nil, true,
|
||||
encodingCfg,
|
||||
|
||||
Reference in New Issue
Block a user