Jelajahi Sumber

runtime: constitution: Weights review fix.

Shamil Gadelshin 4 tahun lalu
induk
melakukan
a5bca6f1f5

+ 3 - 1
runtime-modules/constitution/src/benchmarking.rs

@@ -17,11 +17,13 @@ fn assert_last_event<T: Trait>(generic_event: <T as Trait>::Event) {
     assert_eq!(event, &system_event);
 }
 
+const MAX_BYTES: u32 = 50000;
+
 benchmarks! {
     _{ }
 
     amend_constitution{
-        let i in 1 .. 50000;
+        let i in 1 .. MAX_BYTES;
         let text = vec![0u8].repeat(i as usize);
 
     }: _ (RawOrigin::Root, text.clone())

+ 0 - 1
runtime-modules/constitution/src/lib.rs

@@ -10,7 +10,6 @@
 #[cfg(test)]
 pub(crate) mod tests;
 
-#[cfg(feature = "runtime-benchmarks")]
 mod benchmarking;
 
 use codec::{Decode, Encode};