Skip to content

Commit

Permalink
Merge pull request #2233 from eqlabs/t00ts/ethereum-initial-sync
Browse files Browse the repository at this point in the history
  • Loading branch information
t00ts committed Sep 12, 2024
2 parents 0e89820 + 9bc374d commit 3a06370
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/pathfinder/src/state/sync/l1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ where
poll_interval,
} = context;

// Listen for state updates and send them to the event channel
// Fetch the current Starknet state from Ethereum
let state_update = ethereum.get_starknet_state(&core_address).await?;
let _ = tx_event.send(SyncEvent::L1Update(state_update)).await;

// Subscribe to subsequent state updates and message logs
let tx_event = std::sync::Arc::new(tx_event);
ethereum
.listen(&core_address, poll_interval, move |event| {
Expand Down

0 comments on commit 3a06370

Please sign in to comment.