From 6867329ce370906dc5c6f7ac3dd47cfdf72038de Mon Sep 17 00:00:00 2001 From: jackzhhuang Date: Mon, 9 Dec 2024 11:18:02 +0800 Subject: [PATCH] remove sync block in store before executing the dag block --- sync/src/tasks/block_sync_task.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sync/src/tasks/block_sync_task.rs b/sync/src/tasks/block_sync_task.rs index 1f83b1b344..e68ae73db8 100644 --- a/sync/src/tasks/block_sync_task.rs +++ b/sync/src/tasks/block_sync_task.rs @@ -454,6 +454,7 @@ where if block_header.number() % ASYNC_BLOCK_COUNT == 0 || block_header.number() >= self.target.target_id.number() { + self.sync_dag_store.delete_all_dag_sync_block()?; self.find_absent_ancestor(vec![block_header.clone()]) .await?; @@ -474,7 +475,6 @@ where block: block.clone(), children: vec![], })?; - self.sync_dag_store.save_block(block)?; anyhow::Ok(ParallelSign::NeedMoreBlocks) } };