Skip to content

Commit

Permalink
Don's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Fly-Style committed Nov 29, 2024
1 parent 8d961f4 commit 36b90e9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions indexer/src/fastnear_indexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,12 @@ impl FastNearIndexer {
loop {
match Self::fetch_latest_block(&client).await {
Ok(block) => {
if block_sender.send(block.clone()).await.is_err() {
let block_height = block.block.header.height;
if block_sender.send(block).await.is_err() {
error!(FASTNEAR_INDEXER, "Failed to send block to channel");
break;
}
info!(FASTNEAR_INDEXER, "Successfully fetched and sent latest block with id: {}", block.block.header.height);
info!(FASTNEAR_INDEXER, "Successfully fetched and sent latest block with id: {}", block_height);
}
Err(e) => error!(FASTNEAR_INDEXER, "Error fetching latest block: {:?}", e),
}
Expand Down

0 comments on commit 36b90e9

Please sign in to comment.