Skip to content

Commit

Permalink
Merge pull request #2264 from subspace/include_storage_version
Browse files Browse the repository at this point in the history
Set storage version of pallet domains to match storage version on gemini-3g
  • Loading branch information
vedhavyas authored Nov 23, 2023
2 parents b744fba + ec14545 commit 64fe9df
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/pallet-domains/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ use crate::block_tree::verify_execution_receipt;
use crate::staking::OperatorStatus;
use codec::{Decode, Encode};
use frame_support::ensure;
use frame_support::pallet_prelude::StorageVersion;
use frame_support::traits::fungible::{Inspect, InspectHold};
use frame_support::traits::{Get, Randomness as RandomnessT};
use frame_system::offchain::SubmitTransaction;
Expand Down Expand Up @@ -108,6 +109,9 @@ pub type DomainBlockNumberFor<T> = <<T as Config>::DomainHeader as Header>::Numb
pub type DomainHashingFor<T> = <<T as Config>::DomainHeader as Header>::Hashing;
pub type ReceiptHashFor<T> = <<T as Config>::DomainHeader as Header>::Hash;

/// The current storage version.
const STORAGE_VERSION: StorageVersion = StorageVersion::new(1);

#[frame_support::pallet]
mod pallet {
#![allow(clippy::large_enum_variant)]
Expand Down Expand Up @@ -141,7 +145,7 @@ mod pallet {
use crate::weights::WeightInfo;
use crate::{
BalanceOf, DomainBlockNumberFor, ElectionVerificationParams, HoldIdentifier, NominatorId,
OpaqueBundleOf, ReceiptHashFor,
OpaqueBundleOf, ReceiptHashFor, STORAGE_VERSION,
};
use alloc::string::String;
use codec::FullCodec;
Expand Down Expand Up @@ -300,6 +304,7 @@ mod pallet {

#[pallet::pallet]
#[pallet::without_storage_info]
#[pallet::storage_version(STORAGE_VERSION)]
pub struct Pallet<T>(_);

/// Bundles submitted successfully in current block.
Expand Down

0 comments on commit 64fe9df

Please sign in to comment.