@@ -44,7 +44,7 @@ use polkadot_node_primitives::approval::{
4444} ;
4545use parity_scale_codec:: Encode ;
4646use sc_keystore:: LocalKeystore ;
47- use sp_consensus_slots:: SlotNumber ;
47+ use sp_consensus_slots:: Slot ;
4848use sc_client_api:: backend:: AuxStore ;
4949use sp_runtime:: traits:: AppVerify ;
5050use sp_application_crypto:: Pair ;
@@ -71,7 +71,7 @@ mod time;
7171mod tests;
7272
7373const APPROVAL_SESSIONS : SessionIndex = 6 ;
74- const LOG_TARGET : & str = "approval-voting " ;
74+ const LOG_TARGET : & str = "approval_voting " ;
7575
7676/// The approval voting subsystem.
7777pub struct ApprovalVotingSubsystem < T > {
@@ -663,7 +663,7 @@ struct ImportedBlockInfo {
663663 assignments : HashMap < CoreIndex , OurAssignment > ,
664664 n_validators : usize ,
665665 relay_vrf_story : RelayVRFStory ,
666- slot : SlotNumber ,
666+ slot : Slot ,
667667}
668668
669669// Computes information about the imported block. Returns `None` if the info couldn't be extracted -
@@ -755,7 +755,7 @@ async fn imported_block_info(
755755
756756 match unsafe_vrf {
757757 Some ( unsafe_vrf) => {
758- let slot = unsafe_vrf. slot_number ( ) ;
758+ let slot = unsafe_vrf. slot ( ) ;
759759
760760 match unsafe_vrf. compute_randomness (
761761 & babe_epoch. authorities ,
@@ -887,7 +887,7 @@ async fn handle_new_head(
887887 number : block_header. number ,
888888 parent_hash : block_header. parent_hash ,
889889 candidates : included_candidates. iter ( ) . map ( |( hash, _, _, _) | * hash) . collect ( ) ,
890- slot_number : slot,
890+ slot,
891891 } ) ;
892892
893893 let ( block_tick, no_show_duration) = {
@@ -897,7 +897,7 @@ async fn handle_new_head(
897897 let block_tick = slot_number_to_tick ( state. slot_duration_millis , slot) ;
898898 let no_show_duration = slot_number_to_tick (
899899 state. slot_duration_millis ,
900- session_info. no_show_slots as _ ,
900+ Slot :: from ( u64 :: from ( session_info. no_show_slots ) ) ,
901901 ) ;
902902
903903 ( block_tick, no_show_duration)
@@ -934,7 +934,7 @@ fn check_and_import_assignment(
934934 assignment : IndirectAssignmentCert ,
935935 candidate_index : CandidateIndex ,
936936) -> SubsystemResult < AssignmentCheckResult > {
937- const TOO_FAR_IN_FUTURE : SlotNumber = 5 ;
937+ const SLOT_TOO_FAR_IN_FUTURE : u64 = 5 ;
938938
939939 let tick_now = state. clock . tick_now ( ) ;
940940
@@ -1004,7 +1004,7 @@ fn check_and_import_assignment(
10041004 Ok ( tranche) => {
10051005 let tranche_now_of_prev_slot = state. clock . tranche_now (
10061006 state. slot_duration_millis ,
1007- block_entry. slot . saturating_sub ( TOO_FAR_IN_FUTURE ) ,
1007+ block_entry. slot . saturating_sub ( SLOT_TOO_FAR_IN_FUTURE ) ,
10081008 ) ;
10091009
10101010 if tranche >= tranche_now_of_prev_slot {
@@ -1029,7 +1029,7 @@ fn check_and_import_assignment(
10291029 let block_tick = slot_number_to_tick ( state. slot_duration_millis , block_entry. slot ) ;
10301030 let no_show_duration = slot_number_to_tick (
10311031 state. slot_duration_millis ,
1032- session_info. no_show_slots as _ ,
1032+ Slot :: from ( u64 :: from ( session_info. no_show_slots ) ) ,
10331033 ) ;
10341034
10351035 ( block_tick, no_show_duration)
@@ -1211,7 +1211,7 @@ fn check_full_approvals(
12111211 & candidate_entry. approvals ,
12121212 tranche_now,
12131213 slot_number_to_tick ( state. slot_duration_millis , block_entry. slot ) ,
1214- slot_number_to_tick ( state. slot_duration_millis , session_info. no_show_slots as _ ) ,
1214+ slot_number_to_tick ( state. slot_duration_millis , Slot :: from ( u64 :: from ( session_info. no_show_slots ) ) ) ,
12151215 session_info. needed_approvals as _
12161216 ) ;
12171217
@@ -1467,7 +1467,7 @@ async fn process_wakeup(
14671467 let block_tick = slot_number_to_tick ( state. slot_duration_millis , block_entry. slot ) ;
14681468 let no_show_duration = slot_number_to_tick (
14691469 state. slot_duration_millis ,
1470- session_info. no_show_slots as _ ,
1470+ Slot :: from ( u64 :: from ( session_info. no_show_slots ) ) ,
14711471 ) ;
14721472
14731473 let should_broadcast = {
0 commit comments