inital commit, which is clearly not initial

Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
Uncle Stretch
2024-10-03 15:38:52 +03:00
commit 66719626bb
178 changed files with 41709 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
use sp_core::parameter_types;
use sp_weights::{constants::WEIGHT_REF_TIME_PER_NANOS, Weight};
parameter_types! {
pub const ExtrinsicBaseWeight: Weight =
Weight::from_ref_time(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(94_914));
}
#[cfg(test)]
mod test_weights {
use sp_weights::constants;
#[test]
fn sane() {
let w = super::ExtrinsicBaseWeight::get();
assert!(
w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS,
"Weight should be at least 10 µs."
);
assert!(
w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
"Weight should be at most 1 ms."
);
}
}