mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 12:27:56 +00:00
Run integrity_test in Externalities (#14546)
* Run integrity_test in RO externalities Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * frame-support: Export RO externalities Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix bench tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update docs Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Rename to __private Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Run in TestExternalities Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix other pallets Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update docs Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fixes Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/support/src/dispatch.rs Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com> * Fixup merge Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: parity-processbot <> Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com>
This commit is contained in:
committed by
GitHub
parent
26d8e65910
commit
5b89f47df2
@@ -282,16 +282,12 @@ pub mod pallet {
|
||||
}
|
||||
|
||||
fn integrity_test() {
|
||||
sp_std::if_std! {
|
||||
sp_io::TestExternalities::new_empty().execute_with(|| {
|
||||
// ensure that the value of `ErasToCheckPerBlock` is less than
|
||||
// `T::MaxErasToCheckPerBlock`.
|
||||
assert!(
|
||||
ErasToCheckPerBlock::<T>::get() <= T::MaxErasToCheckPerBlock::get(),
|
||||
"the value of `ErasToCheckPerBlock` is greater than `T::MaxErasToCheckPerBlock`",
|
||||
);
|
||||
});
|
||||
}
|
||||
// Ensure that the value of `ErasToCheckPerBlock` is less or equal to
|
||||
// `T::MaxErasToCheckPerBlock`.
|
||||
assert!(
|
||||
ErasToCheckPerBlock::<T>::get() <= T::MaxErasToCheckPerBlock::get(),
|
||||
"the value of `ErasToCheckPerBlock` is greater than `T::MaxErasToCheckPerBlock`",
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
|
||||
Reference in New Issue
Block a user