Skip to content

Commit

Permalink
fix: move bscSideChainId out of loop
Browse files Browse the repository at this point in the history
  • Loading branch information
j75689 committed Jan 2, 2024
1 parent 25762d5 commit b75f19c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/stake/endblock.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ func handleRefundStake(ctx sdk.Context, sideChainPrefix []byte, k keeper.Keeper)
var refundEvents sdk.Events
count := 0
boundDenom := k.BondDenom(sideChainCtx)

bscSideChainId := k.ScKeeper.BscSideChainId(ctx)
unBoundingDelegationSize := k.GetUnbondingSizeInQueue(sideChainCtx, ctx.BlockHeader().Time)
if unBoundingDelegationSize >= maxUnboundPerDay {
ctx.Logger().Info("unBoundingDelegation exceed the maxUnboundPerDay")
Expand All @@ -293,7 +293,7 @@ func handleRefundStake(ctx sdk.Context, sideChainPrefix []byte, k keeper.Keeper)
if delegation.CrossStake {
ctx = ctx.WithCrossStake(true)
}
bscSideChainId := k.ScKeeper.BscSideChainId(ctx)

result := handleMsgSideChainUndelegate(ctx, types.MsgSideChainUndelegate{
DelegatorAddr: delegation.DelegatorAddr,
ValidatorAddr: delegation.ValidatorAddr,
Expand Down

0 comments on commit b75f19c

Please sign in to comment.