Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ where
continue;
};

slot_timer.update_scheduling(core.total_cores().into());
// Temp hack to ensure we use only 1 core per RCB.
slot_timer.update_scheduling(1);

// We mainly call this to inform users at genesis if there is a mismatch with the
// on-chain data.
Expand Down Expand Up @@ -541,10 +542,10 @@ impl Core {
self.core_index
}

/// Returns the total number of cores.
pub(crate) fn total_cores(&self) -> u16 {
self.number_of_cores
}
// Returns the total number of cores.
// pub(crate) fn total_cores(&self) -> u16 {
// self.number_of_cores
// }
}

/// Determine the core for the given `para_id`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ async fn determine_core_new_relay_parent() {
let core = core.unwrap();
assert_eq!(core.core_selector(), CoreSelector(0));
assert_eq!(core.core_index(), CoreIndex(0));
assert_eq!(core.total_cores(), 2);
// assert_eq!(core.total_cores(), 2);
}

#[tokio::test]
Expand Down Expand Up @@ -180,7 +180,7 @@ async fn determine_core_with_core_info() {
Ok(Some(core)) => {
assert_eq!(core.core_selector(), CoreSelector(1)); // Should be next selector (0 + 1)
assert_eq!(core.core_index(), CoreIndex(1));
assert_eq!(core.total_cores(), 3);
// assert_eq!(core.total_cores(), 3);
},
Ok(None) => panic!("Expected Some core, got None"),
Err(()) => panic!("determine_core returned error"),
Expand Down Expand Up @@ -304,7 +304,7 @@ async fn determine_core_uses_last_claimed_core_selector() {
// Should use last_claimed_core_selector (1) + 1 = 2
assert_eq!(core.core_selector(), CoreSelector(2));
assert_eq!(core.core_index(), CoreIndex(2));
assert_eq!(core.total_cores(), 3);
// assert_eq!(core.total_cores(), 3);
},
Ok(None) => panic!("Expected Some core, got None"),
Err(()) => panic!("determine_core returned error"),
Expand Down Expand Up @@ -406,7 +406,7 @@ async fn determine_core_no_last_claimed_core_selector() {
// Should start from selector 0 + 1 = 1 when no last selector
assert_eq!(core.core_selector(), CoreSelector(1));
assert_eq!(core.core_index(), CoreIndex(1));
assert_eq!(core.total_cores(), 3);
// assert_eq!(core.total_cores(), 3);
},
Ok(None) => panic!("Expected Some core, got None"),
Err(()) => panic!("determine_core returned error"),
Expand Down
Loading