frame_support::pallet_prelude: reexport StorageVersion (#11408)

* frame_support::pallet_prelude: reexport StorageVersion

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* cargo fmt

Signed-off-by: koushiro <koushiro.cqx@gmail.com>
This commit is contained in:
Qinxuan Chen
2022-05-18 02:28:34 +08:00
committed by GitHub
parent f64470529e
commit 8bce841d70
16 changed files with 44 additions and 51 deletions
+5 -6
View File
@@ -43,10 +43,11 @@ use frame_support::{
dispatch::DispatchResultWithPostInfo,
pallet_prelude::Get,
storage,
traits::{KeyOwnerProofSystem, OneSessionHandler, StorageVersion},
traits::{KeyOwnerProofSystem, OneSessionHandler},
weights::{Pays, Weight},
WeakBoundedVec,
};
use scale_info::TypeInfo;
use sp_runtime::{generic::DigestItem, traits::Zero, DispatchResult, KeyTypeId};
use sp_session::{GetSessionNumber, GetValidatorCount};
use sp_staking::SessionIndex;
@@ -69,17 +70,15 @@ pub use equivocation::{
pub use pallet::*;
use scale_info::TypeInfo;
/// The current storage version.
const STORAGE_VERSION: StorageVersion = StorageVersion::new(4);
#[frame_support::pallet]
pub mod pallet {
use super::*;
use frame_support::{dispatch::DispatchResult, pallet_prelude::*};
use frame_system::pallet_prelude::*;
/// The current storage version.
const STORAGE_VERSION: StorageVersion = StorageVersion::new(4);
#[pallet::pallet]
#[pallet::generate_store(pub(super) trait Store)]
#[pallet::storage_version(STORAGE_VERSION)]