瀏覽代碼

runtime: constitution: Weights review fix.

Shamil Gadelshin 4 年之前
父節點
當前提交
a5bca6f1f5
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. 3 1
      runtime-modules/constitution/src/benchmarking.rs
  2. 0 1
      runtime-modules/constitution/src/lib.rs

+ 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};