Skip to content
Snippets Groups Projects
Commit ecafcd43 authored by Davide Galassi's avatar Davide Galassi Committed by GitHub
Browse files

Fork tree prune assumptions removal v2 (#13327)


* Removed assumptions about ancestry from fork tree prune method

* Tests improvement

* Fork tree prune refactory

* Code refactory

* Correctly handle borderline, but legit, case

* Apply suggestions from code review

Co-authored-by: default avatarAndré Silva <123550+andresilva@users.noreply.github.com>

* Removed duplicated test

---------

Co-authored-by: default avatarAndré Silva <123550+andresilva@users.noreply.github.com>
parent 53b77785
No related merge requests found
......@@ -1039,7 +1039,7 @@ mod tests {
let mut nodes: Vec<_> = epoch_changes.tree().iter().map(|(h, _, _)| h).collect();
nodes.sort();
assert_eq!(nodes, vec![b"A", b"B", b"C", b"E", b"F", b"G"]);
assert_eq!(nodes, vec![b"A", b"B", b"C", b"F", b"G"]);
// Finalize block y @ number 35, slot 330
// This should prune all nodes imported by blocks with a number < 35 that are not
......@@ -1050,7 +1050,7 @@ mod tests {
let mut nodes: Vec<_> = epoch_changes.tree().iter().map(|(h, _, _)| h).collect();
nodes.sort();
assert_eq!(nodes, vec![b"B", b"C", b"F", b"G"]);
assert_eq!(nodes, vec![b"B", b"C", b"G"]);
}
#[test]
......
This diff is collapsed.
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment