Skip to content

Commit

Permalink
check the same pruning point when checking the historical blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
jackzhhuang committed Jan 27, 2025
1 parent f2e126b commit 323e42c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flexidag/src/blockdag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,9 @@ impl BlockDAG {
(true, false) => Ok(true),
(false, true) => Ok(false),
(false, false) => {
if self.check_ancestor_of(header.pruning_point(), pruning_point)? {
if header.pruning_point() == pruning_point {
Ok(false)
} else if self.check_ancestor_of(header.pruning_point(), pruning_point)? {
Ok(true)
} else {
Ok(false)
Expand Down

0 comments on commit 323e42c

Please sign in to comment.