Skip to content

Commit

Permalink
return out of push_mergeset, if we cannot push any more.
Browse files Browse the repository at this point in the history
  • Loading branch information
D-Stacks committed Nov 18, 2024
1 parent fa43c3a commit e4fb910
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion consensus/src/processes/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,9 @@ impl<T: GhostdagStoreReader, U: BlockWindowCacheReader, V: HeaderStoreReader, W:
for block in self.sampled_mergeset_iterator(sample_rate, ghostdag_data, selected_parent_blue_work) {
match block {
SampledBlock::Sampled(block) => {
heap.deref_mut().try_push(block.hash, block.blue_work);
if !heap.deref_mut().try_push(block.hash, block.blue_work) {
return;
}
}
SampledBlock::NonDaa(hash) => mergeset_non_daa_inserter(hash),
}
Expand Down

0 comments on commit e4fb910

Please sign in to comment.