Skip to content

Commit fee63c4

Browse files
author
Naohiro Yoshida
committed
check
1 parent ddfd92e commit fee63c4

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

light-client/src/fork_spec.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,4 +746,24 @@ mod test {
746746
assert_eq!(v.current_fork_spec, specs[0]);
747747
assert_eq!(v.previous_fork_spec, specs[0]);
748748
}
749+
750+
#[test]
751+
fn test_belc3() {
752+
let f1 = ForkSpec {
753+
height_or_timestamp: HeightOrTimestamp::Height(0),
754+
additional_header_item_count: 1,
755+
epoch_length: 900,
756+
max_turn_length: 64,
757+
};
758+
let f2 = ForkSpec {
759+
height_or_timestamp: HeightOrTimestamp::Height(2500),
760+
additional_header_item_count: 1,
761+
epoch_length: 5000,
762+
max_turn_length: 64,
763+
};
764+
let be = f2.boundary_epochs(&f1).unwrap();
765+
assert_eq!(be.prev_last, 1800);
766+
assert_eq!(be.intermediates, [2700, 3600, 4500]);
767+
assert_eq!(be.current_first, 5000);
768+
}
749769
}

0 commit comments

Comments
 (0)