From 699eb1e6d4a75082819f722accad0572541b89d0 Mon Sep 17 00:00:00 2001 From: Mirko von Leipzig <48352201+Mirko-von-Leipzig@users.noreply.github.com> Date: Fri, 2 Feb 2024 17:15:46 +0200 Subject: [PATCH] fix(sync): pending restarted in loop --- crates/pathfinder/src/state/sync/l2.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/pathfinder/src/state/sync/l2.rs b/crates/pathfinder/src/state/sync/l2.rs index 318c7a7403..ad7685d148 100644 --- a/crates/pathfinder/src/state/sync/l2.rs +++ b/crates/pathfinder/src/state/sync/l2.rs @@ -105,6 +105,8 @@ where storage, } = context; + let mut pending_handle = None; + 'outer: loop { // Get the next block from L2. let (next, head_meta) = match &head { @@ -114,8 +116,6 @@ where let t_block = std::time::Instant::now(); - let mut pending_handle = None; - let (block, commitments, state_update) = loop { match download_block( next,