fix: clear active download requests if node fully synced (#2967)

This commit is contained in:
Matthias Seitz
2023-06-02 20:37:47 +02:00
committed by GitHub
parent 5c7c6608d1
commit 8c5379984b

View File

@ -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);