Skip to content

Commit

Permalink
chore: add more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
j75689 committed Jan 12, 2024
1 parent f9b67e6 commit 5aa0e2e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions x/stake/endblock.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,13 @@ func handleRefundStake(ctx sdk.Context, sideChainPrefix []byte, k keeper.Keeper)
}, k)
refundEvents = refundEvents.AppendEvents(result.Events)
if !result.IsOK() {
ctx.Logger().Debug("handleRefundStake failed",
"delegator", delegation.DelegatorAddr.String(),
"validator", delegation.ValidatorAddr.String(),
"amount", delegation.GetShares().String(),
"sideChainId", bscSideChainId,
"result", fmt.Sprintf("%+v", result),
)
// this is to prevent too many delegation is in unbounded state
// if too many delegation is in unbounded state, it will cause too many iteration in the block
failedCount++
Expand Down

0 comments on commit 5aa0e2e

Please sign in to comment.