Skip to content

Commit

Permalink
fix: finalized field calculation (#202)
Browse files Browse the repository at this point in the history
fix: fixed `finalized` field calculation
  • Loading branch information
dk-pontem authored Feb 27, 2024
1 parent 073ddb4 commit 49d8952
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/l1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,16 +274,15 @@ impl InnerWatcher {
}

if self.current_block > self.head_block {
let head_block = self.get_head().await?;
self.head_block = head_block;
self.head_block = self.get_head().await?;
}

if self.current_block <= self.head_block {
self.update_system_config().await?;

let block = self.get_block(self.current_block).await?;
let user_deposits = self.get_deposits(self.current_block).await?;
let finalized = self.current_block >= self.finalized_block;
let finalized = self.current_block <= self.finalized_block;

let l1_info = L1Info::new(
&block,
Expand Down

0 comments on commit 49d8952

Please sign in to comment.