Skip to content

Commit

Permalink
test(sync): add test cases for sync with recoverable and fatal errors
Browse files Browse the repository at this point in the history
  • Loading branch information
CHr15F0x committed Nov 22, 2024
1 parent 0d7bcac commit cd46651
Show file tree
Hide file tree
Showing 6 changed files with 431 additions and 95 deletions.
4 changes: 3 additions & 1 deletion crates/pathfinder/src/bin/pathfinder/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,17 +628,19 @@ fn start_p2p_sync(
l1_checkpoint_override: Option<pathfinder_ethereum::EthereumStateUpdate>,
verify_tree_hashes: bool,
) -> tokio::task::JoinHandle<anyhow::Result<()>> {
use pathfinder_block_hashes::BlockHashDb;

let sync = pathfinder_lib::sync::Sync {
storage,
p2p: p2p_client,
eth_client: ethereum_client,
eth_address: pathfinder_context.l1_core_address,
fgw_client: pathfinder_context.gateway,
chain_id: pathfinder_context.network_id,
chain: pathfinder_context.network,
public_key: gateway_public_key,
l1_checkpoint_override,
verify_tree_hashes,
block_hash_db: Some(BlockHashDb::new(pathfinder_context.network)),
};
tokio::spawn(sync.run())
}
Expand Down
Loading

0 comments on commit cd46651

Please sign in to comment.