Skip to content

Commit

Permalink
remove the dirty tips
Browse files Browse the repository at this point in the history
  • Loading branch information
jackzhhuang committed Jan 4, 2025
1 parent 1b750bb commit 1ab40fa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions chain/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1527,6 +1527,9 @@ impl BlockChain {

let mut new_tips = vec![];
for hash in tips {
if !self.has_dag_block(hash)? {
continue;
}
if !dag.check_ancestor_of(hash, new_tip_block.id())? {
new_tips.push(hash);
}
Expand Down

0 comments on commit 1ab40fa

Please sign in to comment.