mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 22:51:13 +00:00
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: André Silva <123550+andresilva@users.noreply.github.com> * Removed duplicated test --------- Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user