Repository: paritytech/substrate
File: frame/system/src/lib.rs (Rust)

Code before:
		///
		/// - `O(1)`
		#[pallet::call_index(0)]
		#[pallet::weight(T::SystemWeightInfo::remark(_remark.len() as u32))]
		pub fn remark(origin: OriginFor<T>, _remark: Vec<u8>) -> DispatchResultWithPostInfo {
			ensure_signed_or_root(origin)?;
			Ok(().into())
		}

		/// Set the number of pages in the WebAssembly environment's heap.
		#[pallet::call_index(1)]
		#[pallet::weight((T::SystemWeightInfo::set_heap_pages(), DispatchClass::Operational))]
		pub fn set_heap_pages(origin: OriginFor<T>, pages: u64) -> DispatchResultWithPostInfo {
			ensure_root(origin)?;
			storage::unhashed::put_raw(well_known_keys::HEAP_PAGES, &pages.encode());
			Self::deposit_log(generic::DigestItem::RuntimeEnvironmentUpdated);
			Ok(().into())
		}

		/// Set the new runtime code.
		///
		/// - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code`
		/// - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is
		///   expensive).
		/// The weight of this function is dependent on the runtime, but generally this is very
		/// expensive.
		#[pallet::call_index(2)]
		#[pallet::weight((T::SystemWeightInfo::set_code(), DispatchClass::Operational))]
		pub fn set_code(origin: OriginFor<T>, code: Vec<u8>) -> DispatchResultWithPostInfo {
			ensure_root(origin)?;
			Self::can_set_code(&code)?;
			T::OnSetCode::set_code(code)?;
			// consume the rest of the block to prevent further transactions
			Ok(Some(T::BlockWeights::get().max_block).into())
		}

		/// Set the new runtime code without doing any checks of the given `code`.
		///
		/// - `O(C)` where `C` length of `code`
		/// The weight of this function is dependent on the runtime.
		#[pallet::call_index(3)]
		#[pallet::weight((T::SystemWeightInfo::set_code(), DispatchClass::Operational))]
		pub fn set_code_without_checks(
			origin: OriginFor<T>,
			code: Vec<u8>,
		) -> DispatchResultWithPostInfo {
			ensure_root(origin)?;
			T::OnSetCode::set_code(code)?;
			Ok(Some(T::BlockWeights::get().max_block).into())
		}


Review comment (suggestion):
```suggestion
```

This stuff can just be removed.

Code after:
		///
		/// - `O(1)`
		#[pallet::call_index(0)]
		#[pallet::weight(T::SystemWeightInfo::remark(_remark.len() as u32))]
		pub fn remark(origin: OriginFor<T>, _remark: Vec<u8>) -> DispatchResultWithPostInfo {
			ensure_signed_or_root(origin)?;
			Ok(().into())
		}

		/// Set the number of pages in the WebAssembly environment's heap.
		#[pallet::call_index(1)]
		#[pallet::weight((T::SystemWeightInfo::set_heap_pages(), DispatchClass::Operational))]
		pub fn set_heap_pages(origin: OriginFor<T>, pages: u64) -> DispatchResultWithPostInfo {
			ensure_root(origin)?;
			storage::unhashed::put_raw(well_known_keys::HEAP_PAGES, &pages.encode());
			Self::deposit_log(generic::DigestItem::RuntimeEnvironmentUpdated);
			Ok(().into())
		}

		/// Set the new runtime code.
		#[pallet::call_index(2)]
		#[pallet::weight((T::SystemWeightInfo::set_code(), DispatchClass::Operational))]
		pub fn set_code(origin: OriginFor<T>, code: Vec<u8>) -> DispatchResultWithPostInfo {
			ensure_root(origin)?;
			Self::can_set_code(&code)?;
			T::OnSetCode::set_code(code)?;
			// consume the rest of the block to prevent further transactions
			Ok(Some(T::BlockWeights::get().max_block).into())
		}

		/// Set the new runtime code without doing any checks of the given `code`.
		#[pallet::call_index(3)]
		#[pallet::weight((T::SystemWeightInfo::set_code(), DispatchClass::Operational))]
		pub fn set_code_without_checks(
			origin: OriginFor<T>,
			code: Vec<u8>,
		) -> DispatchResultWithPostInfo {
			ensure_root(origin)?;
			T::OnSetCode::set_code(code)?;
			Ok(Some(T::BlockWeights::get().max_block).into())
		}

		/// Set some items of storage.
		#[pallet::call_index(4)]
		#[pallet::weight((
			T::SystemWeightInfo::set_storage(items.len() as u32),
			DispatchClass::Operational,
		))]
		pub fn set_storage(
			origin: OriginFor<T>,
			items: Vec<KeyValue>,