diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 442dec48..23ca270b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,6 +4,7 @@ on: push: branches: - 'main' + - 'gusin13/debug-stats' tags: - '*' diff --git a/internal/v2/queue/handler/stats.go b/internal/v2/queue/handler/stats.go index 4a297054..d33e45e6 100644 --- a/internal/v2/queue/handler/stats.go +++ b/internal/v2/queue/handler/stats.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "net/http" + "strconv" "github.com/babylonlabs-io/staking-api-service/internal/shared/types" queueClient "github.com/babylonlabs-io/staking-queue-client/client" @@ -29,6 +30,11 @@ func (h *V2QueueHandler) ActiveStakingHandler(ctx context.Context, messageBody s // TODO: Perform the address lookup conversion // https://github.com/babylonlabs-io/staking-api-service/issues/162 + log.Debug(). + Str("staking_tx", activeStakingEvent.StakingTxHashHex). + Str("staking_amount", strconv.FormatUint(activeStakingEvent.StakingAmount, 10)). + Msg("processing active delegation event") + statsErr := h.Services.V2Service.ProcessActiveDelegationStats( ctx, activeStakingEvent.StakingTxHashHex, @@ -53,6 +59,11 @@ func (h *V2QueueHandler) UnbondingStakingHandler(ctx context.Context, messageBod return types.NewError(http.StatusBadRequest, types.BadRequest, err) } + log.Debug(). + Str("staking_tx", unbondingStakingEvent.StakingTxHashHex). + Str("staking_amount", strconv.FormatUint(unbondingStakingEvent.StakingAmount, 10)). + Msg("processing unbonding delegation event") + // Perform the stats calculation statsErr := h.Services.V2Service.ProcessUnbondingDelegationStats( ctx,