From 8c5379984b5068897cc462847d0730dc9032ef76 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Fri, 2 Jun 2023 20:37:47 +0200 Subject: [PATCH] fix: clear active download requests if node fully synced (#2967) --- crates/consensus/beacon/src/engine/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/consensus/beacon/src/engine/mod.rs b/crates/consensus/beacon/src/engine/mod.rs index 814c037ee2..62a049a844 100644 --- a/crates/consensus/beacon/src/engine/mod.rs +++ b/crates/consensus/beacon/src/engine/mod.rs @@ -480,6 +480,9 @@ where // Terminate the sync early if it's reached the maximum user // configured block. if is_valid_response { + // node's fully synced, clear pending requests + self.sync.clear_full_block_requests(); + // new VALID update that moved the canonical chain forward let _ = self.update_canon_chain(&state); @@ -1014,6 +1017,8 @@ where // we're no longer syncing self.sync_state_updater.update_sync_state(SyncState::Idle); + // clear any active block requests + self.sync.clear_full_block_requests(); // we can update the FCU blocks let _ = self.update_canon_chain(&target);