From 33617c2ba8534a6ddaffe9266f0383a3bf0a4ca8 Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Thu, 29 Feb 2024 12:39:07 -0700 Subject: [PATCH] remove comments --- x/slashing/keeper/signing_info.go | 65 ------------------------------- 1 file changed, 65 deletions(-) diff --git a/x/slashing/keeper/signing_info.go b/x/slashing/keeper/signing_info.go index 19d442eb813d..deb9315fbe6e 100644 --- a/x/slashing/keeper/signing_info.go +++ b/x/slashing/keeper/signing_info.go @@ -55,53 +55,6 @@ func (k Keeper) IterateValidatorSigningInfos(ctx sdk.Context, } } -// // GetValidatorMissedBlockBitArray gets the bit for the missed blocks array -// func (k Keeper) GetValidatorMissedBlockBitArray(ctx sdk.Context, address sdk.ConsAddress, index int64) bool { -// store := ctx.KVStore(k.storeKey) -// bz := store.Get(types.ValidatorMissedBlockBitArrayKey(address, index)) -// var missed gogotypes.BoolValue -// if bz == nil { -// // lazy: treat empty key as not missed -// return false -// } -// k.cdc.MustUnmarshal(bz, &missed) - -// return missed.Value -// } - -// // IterateValidatorMissedBlockBitArray iterates over the signed blocks window -// // and performs a callback function -// func (k Keeper) IterateValidatorMissedBlockBitArray(ctx sdk.Context, -// address sdk.ConsAddress, handler func(index int64, missed bool) (stop bool), -// ) { -// store := ctx.KVStore(k.storeKey) -// index := int64(0) -// // Array may be sparse -// for ; index < k.SignedBlocksWindow(ctx); index++ { -// var missed gogotypes.BoolValue -// bz := store.Get(types.ValidatorMissedBlockBitArrayKey(address, index)) -// if bz == nil { -// continue -// } - -// k.cdc.MustUnmarshal(bz, &missed) -// if handler(index, missed.Value) { -// break -// } -// } -// } - -// // GetValidatorMissedBlocks returns array of missed blocks for given validator Cons address -// func (k Keeper) GetValidatorMissedBlocks(ctx sdk.Context, address sdk.ConsAddress) []types.MissedBlock { -// missedBlocks := []types.MissedBlock{} -// k.IterateValidatorMissedBlockBitArray(ctx, address, func(index int64, missed bool) (stop bool) { -// missedBlocks = append(missedBlocks, types.NewMissedBlock(index, missed)) -// return false -// }) - -// return missedBlocks -// } - // JailUntil attempts to set a validator's JailedUntil attribute in its signing // info. It will panic if the signing info does not exist for the validator. func (k Keeper) JailUntil(ctx sdk.Context, consAddr sdk.ConsAddress, jailTime time.Time) { @@ -140,24 +93,6 @@ func (k Keeper) IsTombstoned(ctx sdk.Context, consAddr sdk.ConsAddress) bool { return signInfo.Tombstoned } -// // SetValidatorMissedBlockBitArray sets the bit that checks if the validator has -// // missed a block in the current window -// func (k Keeper) SetValidatorMissedBlockBitArray(ctx sdk.Context, address sdk.ConsAddress, index int64, missed bool) { -// store := ctx.KVStore(k.storeKey) -// bz := k.cdc.MustMarshal(&gogotypes.BoolValue{Value: missed}) -// store.Set(types.ValidatorMissedBlockBitArrayKey(address, index), bz) -// } - -// // clearValidatorMissedBlockBitArray deletes every instance of ValidatorMissedBlockBitArray in the store -// func (k Keeper) clearValidatorMissedBlockBitArray(ctx sdk.Context, address sdk.ConsAddress) { -// store := ctx.KVStore(k.storeKey) -// iter := sdk.KVStorePrefixIterator(store, types.ValidatorMissedBlockBitArrayPrefixKey(address)) -// defer iter.Close() -// for ; iter.Valid(); iter.Next() { -// store.Delete(iter.Key()) -// } -// } - // getMissedBlockBitmapChunk gets the bitmap chunk at the given chunk index for // a validator's missed block signing window. func (k Keeper) getMissedBlockBitmapChunk(ctx sdk.Context, addr sdk.ConsAddress, chunkIndex int64) []byte {