From 3cceba94a3fbc4b8556ebe91e5f7d11a7570ed94 Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Thu, 1 Feb 2024 16:16:06 -0600 Subject: [PATCH] simplify deleted check for winning axelar corks --- x/axelarcork/keeper/abci.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/x/axelarcork/keeper/abci.go b/x/axelarcork/keeper/abci.go index 0dcfb094..1b1d2820 100644 --- a/x/axelarcork/keeper/abci.go +++ b/x/axelarcork/keeper/abci.go @@ -44,7 +44,6 @@ func (k Keeper) EndBlocker(ctx sdk.Context) { currentHeight := uint64(ctx.BlockHeight()) latestAxelarCorks := make(map[string]types.WinningAxelarCork) k.IterateWinningAxelarCorks(ctx, config.Id, func(contractAddress common.Address, blockHeight uint64, cork types.AxelarCork) (stop bool) { - deleted := false timeoutHeight := blockHeight + k.GetParamSet(ctx).CorkTimeoutBlocks if currentHeight >= timeoutHeight { k.Logger(ctx).Info("deleting expired approved scheduled axelar cork", @@ -52,10 +51,6 @@ func (k Keeper) EndBlocker(ctx sdk.Context) { "target contract address", cork.TargetContractAddress) k.DeleteWinningAxelarCorkByBlockheight(ctx, config.Id, blockHeight, cork) - deleted = true - } - - if deleted { return false }