Skip to content

Commit

Permalink
Adjust coretime calculation in benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidK committed Nov 11, 2024
1 parent e257413 commit 48d96c8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions substrate/frame/broker/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,11 @@ mod benches {
_(origin as T::RuntimeOrigin, initial_price, extra_cores.try_into().unwrap());

assert!(SaleInfo::<T>::get().is_some());
let sale_start = RCBlockNumberProviderOf::<T::Coretime>::current_block_number() +
config.interlude_length;
assert_last_event::<T>(
Event::SaleInitialized {
sale_start: 2u32.into(),
sale_start,
leadin_length: 1u32.into(),
start_price: 1_000_000_000u32.into(),
end_price: 10_000_000u32.into(),
Expand Down Expand Up @@ -844,9 +846,11 @@ mod benches {
}

assert!(SaleInfo::<T>::get().is_some());
let sale_start = RCBlockNumberProviderOf::<T::Coretime>::current_block_number() +
config.interlude_length;
assert_last_event::<T>(
Event::SaleInitialized {
sale_start: 2u32.into(),
sale_start,
leadin_length: 1u32.into(),
start_price: 1_000_000_000u32.into(),
end_price: 10_000_000u32.into(),
Expand Down

0 comments on commit 48d96c8

Please sign in to comment.