Skip to content

Commit

Permalink
use parents only
Browse files Browse the repository at this point in the history
  • Loading branch information
jackzhhuang committed Sep 7, 2024
1 parent 6d27f2c commit 82cc0e9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions flexidag/src/blockdag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,18 +218,19 @@ impl BlockDAG {
);
let reachability_store = self.storage.reachability_store.clone();

let mut merge_set = ghostdata
.unordered_mergeset_without_selected_parent()
.filter(|hash| self.storage.reachability_store.read().has(*hash).unwrap())
.collect::<Vec<_>>()
.into_iter();
// let mut merge_set = ghostdata
// .unordered_mergeset_without_selected_parent()
// .filter(|hash| self.storage.reachability_store.read().has(*hash).unwrap())
// .collect::<Vec<_>>()
// .into_iter();
let merge_set = header.parents();
let add_block_result = {
let mut reachability_writer = reachability_store.write();
inquirer::add_block(
reachability_writer.deref_mut(),
header.id(),
ghostdata.selected_parent,
&mut merge_set,
&mut merge_set.into_iter(),
)
};
match add_block_result {
Expand Down

0 comments on commit 82cc0e9

Please sign in to comment.