Skip to content

Commit

Permalink
Add logs on consensus client creation
Browse files Browse the repository at this point in the history
  • Loading branch information
coa-telos authored and poplexity committed Sep 17, 2024
1 parent 4e83c0d commit 1b2b101
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
2 changes: 0 additions & 2 deletions client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ impl ConsensusClient {
.await
.wrap_err("Failed to get latest valid executor block")?;

debug!("Latest valid executor block is: {latest_valid_executor_block:?}");

Ok(Self {
config,
execution_api,
Expand Down
17 changes: 16 additions & 1 deletion client/src/main_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,17 @@ pub async fn build_consensus_client(
CannotStartConsensusClient(e.to_string())
})?;

// Translator
info!(
"Created client with latest EVM block: {:?}",
client.latest_evm_number()
);

let lib = client.db.get_lib()?;

if let Some(lib_number) = lib.as_ref().map(|lib| lib.number) {
info!("Last stored LIB: {lib_number}");
}

let latest_number = lib
.as_ref()
.map(|lib| lib.number + config.chain_id.block_delta())
Expand All @@ -73,6 +81,13 @@ pub async fn build_consensus_client(
None => None,
};

if let Some(last_checked) = last_checked.as_ref() {
info!(
"Last stored final block: {}, {}",
last_checked.number, last_checked.hash
);
}

if let Some(last_checked) = last_checked {
if client.is_in_start_stop_range(last_checked.number + 1) {
config.evm_start_block = last_checked.number + 1;
Expand Down

0 comments on commit 1b2b101

Please sign in to comment.