Skip to content

Commit

Permalink
no checking the pruning point if the main header still dose not have …
Browse files Browse the repository at this point in the history
…the pruning point
  • Loading branch information
jackzhhuang committed Sep 13, 2024
1 parent f5f5dbf commit f088974
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chain/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,7 @@ impl ChainReader for BlockChain {
.ok_or_else(|| format_err!("cannot find parent block header"))?;
let ghostdata = self.dag().verify_and_ghostdata(uncles, header)?;

if self.get_pruning_height() <= self.status().head().number() {
if self.status().head().pruning_point() != HashValue::zero() {
self.dag().verify_pruning_point(
previous_header.pruning_point(),
header.pruning_point(),
Expand Down Expand Up @@ -1583,7 +1583,7 @@ impl BlockChain {
4200000
} else if chain_id.is_main() {
0
} else if chain_id.is_dag_test() || chain_id.is_test() {
} else if chain_id.is_dag_test() || chain_id.is_test() || chain_id.is_dev() {
BlockNumber::MAX
} else {
0
Expand Down

0 comments on commit f088974

Please sign in to comment.