Skip to content

Commit

Permalink
chore: print more debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Candinya committed Jun 19, 2024
1 parent 8da7f52 commit 642691b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/service/indexer/l2/indexer_staking.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ func (s *server) closeEpoch(ctx context.Context, header *types.Header, epoch *bi

func (s *server) closeEpochExec(ctx context.Context, epoch *big.Int) error {
// 2.2-3. billing
zap.L().Debug("closeEpochExec: 2.2-3. billing")

totalCollected, err := s.billingFlow(ctx, epoch)

if err != nil {
Expand All @@ -106,6 +108,8 @@ func (s *server) closeEpochExec(ctx context.Context, epoch *big.Int) error {
}

// 2.4. calc request percentage
zap.L().Debug("closeEpochExec: 2.4. calc request percentage")

allNodes, err := s.databaseClient.FindNodeRequestRewardsByEpoch(ctx, epoch)

if err != nil {
Expand Down Expand Up @@ -160,6 +164,8 @@ func (s *server) closeEpochExec(ctx context.Context, epoch *big.Int) error {
}

// 2.5. billing: distribute request rewards
zap.L().Debug("closeEpochExec: 2.5. billing: distribute request rewards")

s.distributeRequestRewards(ctx, rewardNodesAddress, rewardNodesAmount)

return nil
Expand Down

0 comments on commit 642691b

Please sign in to comment.