Skip to content

Commit

Permalink
remove sync block in store before executing the dag block (#4331)
Browse files Browse the repository at this point in the history
* remove sync block in store before executing the dag block

* remove sync db when restarting
  • Loading branch information
jackzhhuang authored Dec 9, 2024
1 parent 840c5ab commit 8a020f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kube/manifest/starcoin-vega.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
- -c
args:
-
rm -rf /sc-data/vega/starcoin.ipc /sc-data/vega/starcoindb/db/starcoindb/LOCK /sc-data/vega/genesis_config.json;
rm -rf /sc-data/vega/sync /sc-data/vega/starcoin.ipc /sc-data/vega/starcoindb/db/starcoindb/LOCK /sc-data/vega/genesis_config.json;
id=$(echo -e $POD_NAME|awk -F'-' '{print $2}') && IFS='; ' read -r -a node_keys <<< $NODE_KEYS &&
node_key=${node_keys[$id]};
if [ ! -z $node_key ]; then
Expand Down
2 changes: 1 addition & 1 deletion sync/src/tasks/block_sync_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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?;

Expand All @@ -474,7 +475,6 @@ where
block: block.clone(),
children: vec![],
})?;
self.sync_dag_store.save_block(block)?;
anyhow::Ok(ParallelSign::NeedMoreBlocks)
}
};
Expand Down

0 comments on commit 8a020f9

Please sign in to comment.