From f5287f6337b1b840352992aaa001401a03951ab0 Mon Sep 17 00:00:00 2001 From: jackzhhuang Date: Thu, 17 Oct 2024 09:52:27 +0800 Subject: [PATCH] add sync log --- kube/manifest/starcoin-halley.yaml | 3 +-- sync/src/tasks/block_sync_task.rs | 9 +++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/kube/manifest/starcoin-halley.yaml b/kube/manifest/starcoin-halley.yaml index 1be303f1c4..d3fa0d3130 100644 --- a/kube/manifest/starcoin-halley.yaml +++ b/kube/manifest/starcoin-halley.yaml @@ -23,7 +23,7 @@ spec: starcoin/node-pool: seed-pool containers: - name: starcoin - image: starcoin/starcoin:pruning-point + image: starcoin/starcoin:slow-sync imagePullPolicy: Always command: - bash @@ -42,7 +42,6 @@ spec: echo "Node start fail, try to remove config and data."; rm /sc-data/halley/config.toml; rm /sc-data/halley/genesis_config.json; - rm -rf /sc-data/halley/ &>/dev/null; fi; ports: - containerPort: 9840 diff --git a/sync/src/tasks/block_sync_task.rs b/sync/src/tasks/block_sync_task.rs index b218b70d2f..1247a7dd78 100644 --- a/sync/src/tasks/block_sync_task.rs +++ b/sync/src/tasks/block_sync_task.rs @@ -613,8 +613,13 @@ where // if it is not, we must pull the dag parent blocks from the peer. info!("now sync dag block -- ensure_dag_parent_blocks_exist"); match self.ensure_dag_parent_blocks_exist(block.clone())? { - ParallelSign::NeedMoreBlocks => return Ok(CollectorState::Need), - ParallelSign::Continue => (), + ParallelSign::NeedMoreBlocks => { + info!("sync dag block -- ensure_dag_parent_blocks returns need"); + return Ok(CollectorState::Need); + } + ParallelSign::Continue => { + info!("sync dag block -- ensure_dag_parent_blocks returns continue"); + } } let state = self.check_enough(); if let anyhow::Result::Ok(CollectorState::Enough) = &state {