input-output-hk / mithril

Stake-based threshold multi-signatures protocol
https://mithril.network
Apache License 2.0
115 stars 36 forks source link

Add `chain_point` to `TimePoint` structure #1717

Closed Alenar closed 1 month ago

Alenar commented 1 month ago

Content

This PR modify the TimePoint structure to add a chain_point property and update the TimePointProvider to retrieve it using ChainObserver::get_current_chain_point.

In order to keep the Ord capability of the TimePoint, Ord is added to ChainPoint as well.

Pre-submit checklist

Issue(s)

Relates to #1697

github-actions[bot] commented 1 month ago

Test Results

    3 files  ±0     43 suites  ±0   8m 27s :stopwatch: -7s   994 tests +2    994 :white_check_mark: +2  0 :zzz: ±0  0 :x: ±0  1 092 runs  +2  1 092 :white_check_mark: +2  0 :zzz: ±0  0 :x: ±0 

Results for commit ed469480. ± Comparison against base commit 635ba540.

This pull request removes 4 and adds 6 tests. Note that renamed tests count towards both. ``` mithril-common ‑ entities::time_point::tests::time_point_ord_cmp_epochs_less mithril-common ‑ entities::time_point::tests::time_point_ord_equal mithril-common ‑ entities::time_point::tests::time_point_ord_same_epoch_greater mithril-common ‑ entities::time_point::tests::time_point_ord_same_epoch_less ``` ``` mithril-common ‑ entities::cardano_chain_point::tests::chain_point_ord_cmp_block_number_take_precedence_over_other_fields mithril-common ‑ entities::cardano_chain_point::tests::chain_point_ord_cmp_if_block_number_and_slot_number_equals_then_compare_block_hash mithril-common ‑ entities::cardano_chain_point::tests::chain_point_ord_cmp_if_block_number_equals_then_compare_slot_numbers mithril-common ‑ entities::time_point::tests::time_point_ord_cmp_epochs_take_precedence_over_other_fields mithril-common ‑ entities::time_point::tests::time_point_ord_cmp_if_epoch_and_immutables_equals_then_compare_over_chain_points mithril-common ‑ entities::time_point::tests::time_point_ord_cmp_if_epoch_equals_then_immutable_take_precedence_over_chain_point ```

:recycle: This comment has been updated with latest results.