mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 10:17:57 +00:00
Bring back the on_finalize weight of staking. (#8463)
* Bring back the on_finalize weighg of stakin. * Better logs * Also make a few things pub * Fix build * Add assertions * Add test. * remove dbg * Update frame/election-provider-multi-phase/src/unsigned.rs * Update frame/staking/src/tests.rs * Fix * Fix * Update frame/election-provider-multi-phase/src/unsigned.rs
This commit is contained in:
@@ -3827,6 +3827,14 @@ fn do_not_die_when_active_is_ed() {
|
||||
})
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn on_finalize_weight_is_nonzero() {
|
||||
ExtBuilder::default().build_and_execute(|| {
|
||||
let on_finalize_weight = <Test as frame_system::Config>::DbWeight::get().reads(1);
|
||||
assert!(Staking::on_initialize(1) >= on_finalize_weight);
|
||||
})
|
||||
}
|
||||
|
||||
mod election_data_provider {
|
||||
use super::*;
|
||||
use frame_election_provider_support::ElectionDataProvider;
|
||||
|
||||
Reference in New Issue
Block a user