Skip to content

Commit ff1d5a5

Browse files
committed
update weights
1 parent 6856d64 commit ff1d5a5

File tree

1 file changed

+10
-2
lines changed
  • polkadot/runtime/parachains/src/paras

1 file changed

+10
-2
lines changed

polkadot/runtime/parachains/src/paras/mod.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,8 @@ pub trait WeightInfo {
582582
fn include_pvf_check_statement() -> Weight;
583583
fn authorize_force_set_current_code_hash() -> Weight;
584584
fn apply_authorized_force_set_current_code(c: u32) -> Weight;
585+
fn freeze_parachain() -> Weight;
586+
fn unfreeze_parachain() -> Weight;
585587
}
586588

587589
pub struct TestWeightInfo;
@@ -636,6 +638,12 @@ impl WeightInfo for TestWeightInfo {
636638
fn apply_authorized_force_set_current_code(_c: u32) -> Weight {
637639
Weight::MAX
638640
}
641+
fn freeze_parachain() -> Weight {
642+
Weight::MAX
643+
}
644+
fn unfreeze_parachain() -> Weight {
645+
Weight::MAX
646+
}
639647
}
640648

641649
#[frame_support::pallet]
@@ -1360,7 +1368,7 @@ pub mod pallet {
13601368
/// will be rejected, and messages originating from this parachain will not be processed.
13611369
/// Only callable by root.
13621370
#[pallet::call_index(12)]
1363-
#[pallet::weight(T::DbWeight::get().reads_writes(1, 1))]
1371+
#[pallet::weight(<T as Config>::WeightInfo::freeze_parachain())]
13641372
pub fn freeze_parachain(origin: OriginFor<T>, para: ParaId) -> DispatchResult {
13651373
ensure_root(origin)?;
13661374
ensure!(Self::is_valid_para(para), Error::<T>::CannotFreeze);
@@ -1374,7 +1382,7 @@ pub mod pallet {
13741382
/// Unfreeze a previously frozen parachain, allowing it to resume progress.
13751383
/// Only callable by root.
13761384
#[pallet::call_index(13)]
1377-
#[pallet::weight(T::DbWeight::get().reads_writes(1, 1))]
1385+
#[pallet::weight(<T as Config>::WeightInfo::unfreeze_parachain())]
13781386
pub fn unfreeze_parachain(origin: OriginFor<T>, para: ParaId) -> DispatchResult {
13791387
ensure_root(origin)?;
13801388
let was_frozen = FrozenParas::<T>::mutate(|frozen| frozen.remove(&para));

0 commit comments

Comments
 (0)