Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangchiqing committed Jan 28, 2025
1 parent 8ddee54 commit e5cd5fc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions module/block_iterator/creator.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ type Creator struct {
var _ module.IteratorCreator = (*Creator)(nil)

// NewCreator creates a block iterator that iterates through blocks by index.
// the root is the block index to start iterating from. (it could either root height or root view)
// the latest is a function that returns the latest block index.
// since latest is a function, the caller can reuse the creator to create block iterator one
// after another to iterate from the root to the latest, and from last iterated to the new latest.
func NewCreator(
getBlockIDByIndex func(uint64) (blockID flow.Identifier, indexed bool, exception error),
progressStorage storage.ConsumerProgress,
Expand Down

0 comments on commit e5cd5fc

Please sign in to comment.