fixing merge conflicts
This commit is contained in:
parent
ca9bfbd791
commit
83efad3c30
@ -106,7 +106,7 @@ func TestBalance_GetAddress(t *testing.T) {
|
||||
|
||||
func TestSanitizeBalances(t *testing.T) {
|
||||
// 1. Generate balances
|
||||
tokens := sdk.TokensFromConsensusPower(81)
|
||||
tokens := sdk.TokensFromConsensusPower(81, sdk.DefaultPowerReduction)
|
||||
coin := sdk.NewCoin("benchcoin", tokens)
|
||||
coins := sdk.Coins{coin}
|
||||
addrs, _ := makeRandomAddressesAndPublicKeys(20)
|
||||
@ -158,7 +158,7 @@ func BenchmarkSanitizeBalances1000(b *testing.B) {
|
||||
|
||||
func benchmarkSanitizeBalances(b *testing.B, nAddresses int) {
|
||||
b.ReportAllocs()
|
||||
tokens := sdk.TokensFromConsensusPower(81)
|
||||
tokens := sdk.TokensFromConsensusPower(81, sdk.DefaultPowerReduction)
|
||||
coin := sdk.NewCoin("benchcoin", tokens)
|
||||
coins := sdk.Coins{coin}
|
||||
addrs, _ := makeRandomAddressesAndPublicKeys(nAddresses)
|
||||
|
||||
@ -39,7 +39,7 @@ func (suite *SimTestSuite) SetupTest() {
|
||||
func (suite *SimTestSuite) getTestingAccounts(r *rand.Rand, n int) []simtypes.Account {
|
||||
accounts := simtypes.RandomAccounts(r, n)
|
||||
|
||||
initAmt := app.StakingKeeper.TokensFromConsensusPower(ctx, 200)
|
||||
initAmt := sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)
|
||||
initCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, initAmt))
|
||||
|
||||
// add coins to the accounts
|
||||
|
||||
@ -129,6 +129,7 @@ func Migrate(stakingState v038staking.GenesisState) *v040staking.GenesisState {
|
||||
MaxEntries: uint32(stakingState.Params.MaxEntries),
|
||||
HistoricalEntries: uint32(stakingState.Params.HistoricalEntries),
|
||||
BondDenom: stakingState.Params.BondDenom,
|
||||
PowerReduction: v040staking.DefaultParams().PowerReduction,
|
||||
},
|
||||
LastTotalPower: stakingState.LastTotalPower,
|
||||
LastValidatorPowers: newLastValidatorPowers,
|
||||
|
||||
@ -55,6 +55,7 @@ func TestMigrate(t *testing.T) {
|
||||
"historical_entries": 0,
|
||||
"max_entries": 0,
|
||||
"max_validators": 0,
|
||||
"power_reduction": "1000000",
|
||||
"unbonding_time": "0s"
|
||||
},
|
||||
"redelegations": [],
|
||||
|
||||
@ -61,7 +61,7 @@ func TestStoreMigration(t *testing.T) {
|
||||
{
|
||||
"ValidatorsByPowerIndexKey",
|
||||
v040staking.GetValidatorsByPowerIndexKey(val),
|
||||
types.GetValidatorsByPowerIndexKey(val),
|
||||
types.GetValidatorsByPowerIndexKey(val, sdk.DefaultPowerReduction),
|
||||
},
|
||||
{
|
||||
"DelegationKey",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user