referrerpolicy=no-referrer-when-downgrade

Attribute Macro frame_support::pallet_macros::whitelist_storage

source ·
#[whitelist_storage]
Expand description

Declare the storage as whitelisted from benchmarking.

Doing so will exclude reads of that value’s storage key from counting towards weight calculations during benchmarking.

This attribute should only be attached to storages that are known to be read/used in every block. This will result in a more accurate benchmarking weight.

§Example

#[frame_support::pallet]
mod pallet {
	#[pallet::pallet]
	pub struct Pallet<T>(_);

	#[pallet::storage]
	#[pallet::whitelist_storage]
	pub type MyStorage<T> = StorageValue<_, u32>;
}

Documentation for this macro can be found at frame_support::pallet_macros::whitelist_storage.