diff --git a/x/distribution/keeper/test_common.go b/x/distribution/keeper/test_common.go index 26033432fcbf..7cc68fcc42d9 100644 --- a/x/distribution/keeper/test_common.go +++ b/x/distribution/keeper/test_common.go @@ -158,44 +158,3 @@ func (fck DummyFeeCollectionKeeper) SetCollectedFees(in sdk.Coins) { func (fck DummyFeeCollectionKeeper) ClearCollectedFees(_ sdk.Context) { heldFees = sdk.Coins{} } - -//__________________________________________________________________________________ -// used in simulation - -// iterate over all the validator distribution infos (inefficient, just used to -// check invariants) -func (k Keeper) IterateValidatorDistInfos(ctx sdk.Context, - fn func(index int64, distInfo types.ValidatorDistInfo) (stop bool)) { - - store := ctx.KVStore(k.storeKey) - iter := sdk.KVStorePrefixIterator(store, ValidatorDistInfoKey) - defer iter.Close() - index := int64(0) - for ; iter.Valid(); iter.Next() { - var vdi types.ValidatorDistInfo - k.cdc.MustUnmarshalBinaryLengthPrefixed(iter.Value(), &vdi) - if fn(index, vdi) { - return - } - index++ - } -} - -// iterate over all the delegation distribution infos (inefficient, just used -// to check invariants) -func (k Keeper) IterateDelegationDistInfos(ctx sdk.Context, - fn func(index int64, distInfo types.DelegationDistInfo) (stop bool)) { - - store := ctx.KVStore(k.storeKey) - iter := sdk.KVStorePrefixIterator(store, DelegationDistInfoKey) - defer iter.Close() - index := int64(0) - for ; iter.Valid(); iter.Next() { - var ddi types.DelegationDistInfo - k.cdc.MustUnmarshalBinaryLengthPrefixed(iter.Value(), &ddi) - if fn(index, ddi) { - return - } - index++ - } -}