Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Run frame_system integrity tests in Externalities (#13092)
Browse files Browse the repository at this point in the history
* Run frame_system integrity tests in Externalities

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Use feature = 'std'

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
  • Loading branch information
ggwpez authored Jan 8, 2023
1 parent e7814a3 commit 5cbd126
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frame/system/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,11 @@ pub mod pallet {

#[pallet::hooks]
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
#[cfg(feature = "std")]
fn integrity_test() {
T::BlockWeights::get().validate().expect("The weights are invalid.");
sp_io::TestExternalities::default().execute_with(|| {
T::BlockWeights::get().validate().expect("The weights are invalid.");
});
}
}

Expand Down

0 comments on commit 5cbd126

Please sign in to comment.