* Revert "feat: staking config (#10988)"
This reverts commit 5e9656f363.
* remove docs
This commit is contained in:
@@ -25,14 +25,12 @@ func TestBeginBlocker(t *testing.T) {
|
||||
addr, pk := sdk.ValAddress(pks[0].Address()), pks[0]
|
||||
tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper)
|
||||
|
||||
InitTokens := sdk.NewIntFromUint64(200_000_000)
|
||||
// bond the validator
|
||||
power := int64(100)
|
||||
amt := tstaking.CreateValidatorWithValPower(addr, pk, power, true)
|
||||
staking.EndBlocker(ctx, app.StakingKeeper)
|
||||
require.Equal(
|
||||
t, app.BankKeeper.GetAllBalances(ctx, sdk.AccAddress(addr)),
|
||||
|
||||
sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.GetParams(ctx).BondDenom, InitTokens.Sub(amt))),
|
||||
)
|
||||
require.Equal(t, amt, app.StakingKeeper.Validator(ctx, addr).GetBondedTokens())
|
||||
|
||||
@@ -11,7 +11,6 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"
|
||||
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
|
||||
"github.com/cosmos/cosmos-sdk/simapp"
|
||||
"github.com/cosmos/cosmos-sdk/testutil"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
@@ -42,8 +41,8 @@ func checkValidatorSigningInfo(t *testing.T, app *simapp.SimApp, addr sdk.ConsAd
|
||||
}
|
||||
|
||||
func TestSlashingMsgs(t *testing.T) {
|
||||
genTokens := testutil.TokensFromConsensusPower(42, testutil.DefaultpowerReduction)
|
||||
bondTokens := testutil.TokensFromConsensusPower(10, testutil.DefaultpowerReduction)
|
||||
genTokens := sdk.TokensFromConsensusPower(42, sdk.DefaultPowerReduction)
|
||||
bondTokens := sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction)
|
||||
genCoin := sdk.NewCoin(sdk.DefaultBondDenom, genTokens)
|
||||
bondCoin := sdk.NewCoin(sdk.DefaultBondDenom, bondTokens)
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package slashing_test
|
||||
|
||||
import (
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
)
|
||||
|
||||
var (
|
||||
// The default power validators are initialized to have within tests
|
||||
InitTokens = sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
package keeper_test
|
||||
|
||||
import sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
|
||||
var (
|
||||
// The default power validators are initialized to have within tests
|
||||
InitTokens = sdk.TokensFromConsensusPower(200, sdk.DefaultPowerReduction)
|
||||
)
|
||||
@@ -94,12 +94,10 @@ func TestHandleNewValidator(t *testing.T) {
|
||||
|
||||
// Validator created
|
||||
amt := tstaking.CreateValidatorWithValPower(addr, val, 100, true)
|
||||
InitTokens := sdk.NewIntFromUint64(200_000_000)
|
||||
|
||||
staking.EndBlocker(ctx, app.StakingKeeper)
|
||||
require.Equal(
|
||||
t, app.BankKeeper.GetAllBalances(ctx, sdk.AccAddress(addr)),
|
||||
|
||||
sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.GetParams(ctx).BondDenom, InitTokens.Sub(amt))),
|
||||
)
|
||||
require.Equal(t, amt, app.StakingKeeper.Validator(ctx, addr).GetBondedTokens())
|
||||
|
||||
Reference in New Issue
Block a user