From 8f779b12b85be8a5cbeacf426459b69e6e884750 Mon Sep 17 00:00:00 2001 From: Jonathan Gimeno Date: Tue, 25 Feb 2020 15:11:52 +0100 Subject: [PATCH] clean code --- x/staking/genesis_test.go | 5 ++--- x/staking/keeper/old_test_common.go | 21 --------------------- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/x/staking/genesis_test.go b/x/staking/genesis_test.go index 551239185f..c582604241 100644 --- a/x/staking/genesis_test.go +++ b/x/staking/genesis_test.go @@ -4,12 +4,11 @@ import ( "fmt" "testing" - "github.com/tendermint/tendermint/crypto/ed25519" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/crypto/ed25519" sdk "github.com/cosmos/cosmos-sdk/types" keep "github.com/cosmos/cosmos-sdk/x/staking/keeper" diff --git a/x/staking/keeper/old_test_common.go b/x/staking/keeper/old_test_common.go index 82bd54a317..e1c75edeae 100644 --- a/x/staking/keeper/old_test_common.go +++ b/x/staking/keeper/old_test_common.go @@ -31,29 +31,8 @@ import ( var ( Addrs = createTestAddrs(500) PKs = createTestPubKeys(500) - - addrDels = []sdk.AccAddress{ - Addrs[0], - Addrs[1], - } - addrVals = []sdk.ValAddress{ - sdk.ValAddress(Addrs[2]), - sdk.ValAddress(Addrs[3]), - sdk.ValAddress(Addrs[4]), - sdk.ValAddress(Addrs[5]), - sdk.ValAddress(Addrs[6]), - } ) -//_______________________________________________________________________________________ - -// intended to be used with require/assert: require.True(ValEq(...)) -func ValEq(t *testing.T, exp, got types.Validator) (*testing.T, bool, string, types.Validator, types.Validator) { - return t, exp.MinEqual(got), "expected:\n%v\ngot:\n%v", exp, got -} - -//_______________________________________________________________________________________ - // create a codec used only for testing func MakeTestCodec() *codec.Codec { var cdc = codec.New()