Skip to content

Commit 5f7e37b

Browse files
committed
latestblock fix
1 parent 7020377 commit 5f7e37b

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

internal/committer/committer.go

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,13 @@ func CommitStreaming() error {
5959
Msg("Failed to get last tracked block number and block ranges from S3")
6060
return err
6161
}
62+
log.Debug().
63+
Int64("maxBlockNumber", maxBlockNumber).
64+
Msg("No files to process - all blocks are up to date from S3")
6265

63-
// if nothing to process, return
66+
nextBlockNumber = uint64(maxBlockNumber + 1)
6467
if len(blockRanges) != 0 {
65-
log.Info().
66-
Int64("maxBlockNumber", maxBlockNumber).
67-
Msg("No files to process - all blocks are up to date from S3")
68-
69-
// Initialize nextBlockNumber for streaming processing
70-
nextBlockNumber = uint64(maxBlockNumber + 1)
71-
log.Info().Uint64("next_commit_block", nextBlockNumber).Msg("Starting streaming producer-consumer processing")
68+
log.Info().Uint64("next_commit_block", nextBlockNumber).Msg("Streaming data from s3")
7269

7370
blockParserDone := make(chan struct{})
7471
blockProcessorDone := make(chan struct{})

internal/committer/poollatest.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
)
1212

1313
func pollLatest() error {
14+
log.Info().Msg("Streaming latest blocks from RPC")
1415
for {
1516
latestBlock, err := libs.RpcClient.GetLatestBlockNumber(context.Background())
1617
if err != nil {

0 commit comments

Comments
 (0)