Skip to content

Commit

Permalink
chore: print more logs
Browse files Browse the repository at this point in the history
why last epoch was empty
  • Loading branch information
Candinya committed Jun 7, 2024
1 parent 645f80d commit aa05d65
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/service/indexer/l2/trigger_billing.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ func (s *server) billingCollect(ctx context.Context, epoch *big.Int) ([]common.A
return nil, nil, fmt.Errorf("build billing collect tokens: %w", err)
}

zap.L().Debug("billing collect tokens", zap.Int64("epoch", epoch.Int64()), zap.Any("users", users), zap.Any("amounts", amounts))

if users == nil || amounts == nil {
// Push an empty epoch
zap.L().Debug("pushing an empty epoch", zap.Int64("epoch", epoch.Int64()))
Expand Down Expand Up @@ -174,10 +176,13 @@ func (s *server) buildBillingCollectTokens(ctx context.Context, nowTime time.Tim

if collectTokensData == nil {
// Nothing to do
zap.L().Debug("nothing to collect")
return nil, nil, nil
}

// Prepare result storage arrays
zap.L().Debug("prepare billing collect tokens result storage arrays", zap.Any("collectTokens", collectTokensData))

var (
users []common.Address
amounts []*big.Int
Expand Down

0 comments on commit aa05d65

Please sign in to comment.