Small fixes to tests in lib_shell
Follow-ups from !2102 (merged). However, unknown whether these tests will be kept after !1512 (merged).
-
test_node.ml : node_store_known_protocol_events Weirdly, this test is not included below. I think I'm the author I will fix it and document it in a separate MR.
-
test_state.ml: test_set_checkpoint_then_purge_rolling
- on line 424/428: Store.Block.Contents.known (block_store, hb1) -> Store.Block.Contents.known (block_store, ha1)
-
test_state_checkpoint.ml: test_future_checkpoint_bad_good_block
- For a follow-up MR: only the first example is actually tested. The test could be extended to also test the scenario of the second example. Also, the other conditions of is_valid_for_checkpoint should be checked.
-
rename test_store function =keys= to =list=
-
for test_store.ml, test_best_know_head_for_checkpoint:
This test is a bit weird as it doesn't do anything with the results of `State.best_known_head`. If the comment is true, then why not assert that `_block` is B3?
Then the test header could something to the effect of:
> Sets the checkpoint to A2 and the head to B3. Then verifies that the known head with highest fitness (as returned by
> `State.best_known_head_for_checkpoint`) for this checkpoint is B3.
- Investigate
if Int32.equal c_level level && not (Block_hash.equal c_block block_hash)
intest_store.ml
. This is a bit weird. Shouldn't it beif not (Int32.equal c_level level) || not (Block_hash.equal c_block block_hash)
?
Edited by Arvid Jakobsson