Skip to content
This repository was archived by the owner on Apr 14, 2025. It is now read-only.

Commit 099023e

Browse files
committed
verbose logging in checkpoint manager
1 parent 608ad3e commit 099023e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

consensus/polybft/checkpoint_manager.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ func (c *checkpointManager) PostBlock(req *PostBlockRequest) error {
327327
if err != nil {
328328
return fmt.Errorf("could not get last processed block for exit events. Error: %w", err)
329329
}
330+
c.logger.Info("[checkPointManager] read last block", "block", lastBlock)
330331

331332
if lastBlock == 0 {
332333
// if we are running in a forked context here we need to make sure that we update the last block
@@ -342,6 +343,8 @@ func (c *checkpointManager) PostBlock(req *PostBlockRequest) error {
342343
return err
343344
}
344345

346+
c.logger.Info("[checkPointManager] got exit events", "count", len(exitEvents))
347+
345348
sort.Slice(exitEvents, func(i, j int) bool {
346349
// keep events in sequential order
347350
return exitEvents[i].ID.Cmp(exitEvents[j].ID) < 0
@@ -351,6 +354,8 @@ func (c *checkpointManager) PostBlock(req *PostBlockRequest) error {
351354
return err
352355
}
353356

357+
c.logger.Info("[checkPointManager] written exit events")
358+
354359
if err := c.state.CheckpointStore.updateLastSaved(block); err != nil {
355360
return err
356361
}

0 commit comments

Comments
 (0)