Add longest chain tests and test vectors.

This commit is contained in:
Age Manning
2019-02-19 15:22:35 +11:00
parent bd66a02cb3
commit 2394f64329
2 changed files with 61 additions and 0 deletions

View File

@@ -45,6 +45,16 @@ fn test_slow_lmd_ghost() {
);
}
#[test]
fn test_longest_chain() {
test_yaml_vectors(
ForkChoiceAlgorithm::LongestChain,
"tests/longest_chain_test_vectors.yaml",
100,
"debug",
);
}
// run a generic test over given YAML test vectors
fn test_yaml_vectors(
fork_choice_algo: ForkChoiceAlgorithm,