Skip to content

Commit

Permalink
Merge pull request #2545 from subspace/fix-enabling-dynamic-cost-of-s…
Browse files Browse the repository at this point in the history
…torage

Fix enabling dynamic cost of storage
  • Loading branch information
nazar-pc authored Feb 21, 2024
2 parents fbc23a8 + 064c622 commit 754c070
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions crates/pallet-runtime-configs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ mod pallet {
impl<T: Config> Pallet<T> {
/// Change enable domains state.
#[pallet::call_index(0)]
#[pallet::weight(<T as Config>::WeightInfo::set_enable_domains())]
#[pallet::weight(< T as Config >::WeightInfo::set_enable_domains())]
pub fn set_enable_domains(origin: OriginFor<T>, enable_domains: bool) -> DispatchResult {
ensure_root(origin)?;

Expand All @@ -128,21 +128,21 @@ mod pallet {

/// Enable or disable dynamic cost of storage.
#[pallet::call_index(1)]
#[pallet::weight(<T as Config>::WeightInfo::set_enable_dynamic_cost_of_storage())]
#[pallet::weight(< T as Config >::WeightInfo::set_enable_dynamic_cost_of_storage())]
pub fn set_enable_dynamic_cost_of_storage(
origin: OriginFor<T>,
enable_dynamic_cost_of_storage: bool,
) -> DispatchResult {
ensure_root(origin)?;

EnableBalanceTransfers::<T>::put(enable_dynamic_cost_of_storage);
EnableDynamicCostOfStorage::<T>::put(enable_dynamic_cost_of_storage);

Ok(())
}

/// Enable or disable balance transfers for all users.
#[pallet::call_index(2)]
#[pallet::weight(<T as Config>::WeightInfo::set_enable_balance_transfers())]
#[pallet::weight(< T as Config >::WeightInfo::set_enable_balance_transfers())]
pub fn set_enable_balance_transfers(
origin: OriginFor<T>,
enable_balance_transfers: bool,
Expand All @@ -156,7 +156,7 @@ mod pallet {

/// Enable or disable calls from non-root users.
#[pallet::call_index(3)]
#[pallet::weight(<T as Config>::WeightInfo::set_enable_non_root_calls())]
#[pallet::weight(< T as Config >::WeightInfo::set_enable_non_root_calls())]
pub fn set_enable_non_root_calls(
origin: OriginFor<T>,
enable_non_root_calls: bool,
Expand Down
2 changes: 1 addition & 1 deletion crates/subspace-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("subspace"),
impl_name: create_runtime_str!("subspace"),
authoring_version: 0,
spec_version: 1,
spec_version: 2,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 0,
Expand Down

0 comments on commit 754c070

Please sign in to comment.