Remove unnecessary changes
This commit is contained in:
parent
e7c2a9614f
commit
e931195831
|
@ -398,6 +398,7 @@ func RandomRequestBeginBlock(r *rand.Rand, validators map[string]mockValidator,
|
|||
// updateValidators mimicks Tendermint's update logic
|
||||
// nolint: unparam
|
||||
func updateValidators(tb testing.TB, r *rand.Rand, current map[string]mockValidator, updates []abci.ValidatorUpdate, event func(string)) map[string]mockValidator {
|
||||
|
||||
for _, update := range updates {
|
||||
switch {
|
||||
case update.Power == 0:
|
||||
|
|
|
@ -699,21 +699,6 @@ func TestGetValidTendermintUpdatesAllNone(t *testing.T) {
|
|||
|
||||
updates := keeper.GetValidTendermintUpdates(ctx)
|
||||
assert.Equal(t, 2, len(updates))
|
||||
|
||||
// test from something to nothing
|
||||
// tendermintUpdate set: {} -> {c1, c2, c3, c4}
|
||||
keeper.ClearTendermintUpdates(ctx)
|
||||
require.Equal(t, 0, len(keeper.GetTendermintUpdates(ctx)))
|
||||
|
||||
keeper.RemoveValidator(ctx, validators[0].OperatorAddr)
|
||||
keeper.RemoveValidator(ctx, validators[1].OperatorAddr)
|
||||
|
||||
updates = keeper.GetTendermintUpdates(ctx)
|
||||
assert.Equal(t, 2, len(updates))
|
||||
assert.Equal(t, tmtypes.TM2PB.PubKey(validators[0].ConsPubKey), updates[0].PubKey)
|
||||
assert.Equal(t, tmtypes.TM2PB.PubKey(validators[1].ConsPubKey), updates[1].PubKey)
|
||||
assert.Equal(t, int64(0), updates[0].Power)
|
||||
assert.Equal(t, int64(0), updates[1].Power)
|
||||
assert.Equal(t, validators[0].ABCIValidatorUpdate(), updates[0])
|
||||
assert.Equal(t, validators[1].ABCIValidatorUpdate(), updates[1])
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue