Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Revert "Refactory of Fork-Tree data structure (#11228)"
Browse files Browse the repository at this point in the history
This reverts commit b9df248.
  • Loading branch information
coderobe committed May 25, 2022
1 parent ef66142 commit 30a1cb2
Show file tree
Hide file tree
Showing 2 changed files with 424 additions and 359 deletions.
4 changes: 2 additions & 2 deletions client/finality-grandpa/src/authorities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ where
where
F: Fn(&H, &H) -> Result<bool, E>,
{
let filter = |node_hash: &H, node_num: &N, _: &PendingChange<H, N>| {
let mut filter = |node_hash: &H, node_num: &N, _: &PendingChange<H, N>| {
if number >= *node_num &&
(is_descendent_of(node_hash, &hash).unwrap_or_default() || *node_hash == hash)
{
Expand All @@ -245,7 +245,7 @@ where
};

// Remove standard changes.
let _ = self.pending_standard_changes.drain_filter(&filter);
let _ = self.pending_standard_changes.drain_filter(&mut filter);

// Remove forced changes.
self.pending_forced_changes
Expand Down
Loading

0 comments on commit 30a1cb2

Please sign in to comment.