Skip to content

Commit

Permalink
Remove hacky backward verification test
Browse files Browse the repository at this point in the history
  • Loading branch information
romac committed Jan 12, 2021
1 parent 5bfb087 commit b789498
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions light-client/tests/light_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,25 +112,10 @@ fn forward_test(tc: LightClientTest<LightBlock>) {
}
}

/// Test that the light client succeeds when the target height is
/// lower than the last trusted state height.
///
/// To do this, we swap the trusted and target heights,
/// and run the standard forward test.
/// We then assert that we get the expected error.
fn backward_test(mut tc: LightClientTest<LightBlock>) {
let trusted_height = tc.trust_options.height;
tc.trust_options.height = tc.height_to_verify;
tc.height_to_verify = trusted_height;

forward_test(tc)
}

#[test]
fn run_tests() {
let mut tester = Tester::new("light client verification", TEST_FILES_PATH);
tester.add_test("forward verification with bisection", forward_test);
tester.add_test("backward sequential verification", backward_test);
tester.run_foreach_in_dir("bisection/single_peer");
tester.finalize();
}
}

0 comments on commit b789498

Please sign in to comment.