Saner weights + lease calcuation fix. (#2778)

And have proper benchmarks.

---------

Co-authored-by: eskimor <eskimor@no-such-url.com>
Co-authored-by: command-bot <>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
This commit is contained in:
eskimor
2023-12-27 14:17:59 +01:00
committed by GitHub
parent 7070b65d76
commit dcbc36a1c4
6 changed files with 176 additions and 158 deletions
@@ -885,6 +885,17 @@ mod benches {
T::Coretime::request_revenue_info_at(rc_block);
}
}
#[benchmark]
fn notify_core_count() -> Result<(), BenchmarkError> {
let admin_origin =
T::AdminOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?;
#[extrinsic_call]
_(admin_origin as T::RuntimeOrigin, 100);
assert!(CoreCountInbox::<T>::take().is_some());
Ok(())
}
#[benchmark]
fn do_tick_base() -> Result<(), BenchmarkError> {