Skip to content

Commit

Permalink
move maxint64 to const
Browse files Browse the repository at this point in the history
  • Loading branch information
Yarom Swisa authored and Yarom Swisa committed May 7, 2023
1 parent 7e1416a commit 881aaae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion x/pairing/keeper/msg_server_freeze.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (
"github.com/lavanet/lava/x/pairing/types"
)

const FROZEN_BLOCK = math.MaxInt64

func (k msgServer) FreezeProvider(goCtx context.Context, msg *types.MsgFreezeProvider) (*types.MsgFreezeProviderResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

Expand All @@ -33,7 +35,7 @@ func (k Keeper) FreezeProvider(ctx sdk.Context, provider string, chainIDs []stri
}

// freeze the provider by making the StakeAppliedBlock be max. This will remove the provider from the pairing list in the next epoch
stakeEntry.StakeAppliedBlock = math.MaxInt64
stakeEntry.StakeAppliedBlock = FROZEN_BLOCK
k.epochStorageKeeper.ModifyStakeEntryCurrent(ctx, epochstoragetypes.ProviderKey, chainId, stakeEntry, index)
}

Expand Down

0 comments on commit 881aaae

Please sign in to comment.