From a6f499b33872a851980fcb968ca5c7957ca9f72a Mon Sep 17 00:00:00 2001 From: Jack Huang Date: Wed, 18 Sep 2024 12:04:06 +0800 Subject: [PATCH] fix the abent block (#4199) --- sync/src/tasks/block_sync_task.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/sync/src/tasks/block_sync_task.rs b/sync/src/tasks/block_sync_task.rs index b143d39318..4c27cecf9d 100644 --- a/sync/src/tasks/block_sync_task.rs +++ b/sync/src/tasks/block_sync_task.rs @@ -399,15 +399,13 @@ where return Ok(()); } for parent in parents { - if self.local_store.get_dag_sync_block(parent)?.is_none() { - if absent_blocks.contains(&parent) { - continue; - } - if self.chain.has_dag_block(parent)? { - continue; - } - absent_blocks.push(parent) + if absent_blocks.contains(&parent) { + continue; + } + if self.chain.has_dag_block(parent)? { + continue; } + absent_blocks.push(parent); } Ok(()) }