Skip to content

Commit

Permalink
local weights
Browse files Browse the repository at this point in the history
  • Loading branch information
muharem committed Jun 4, 2024
1 parent 5c52a3a commit a0a05c1
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 1 deletion.
8 changes: 7 additions & 1 deletion system-parachains/people/people-kusama/src/identity_ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ pub mod pallet_identity_ops {
use frame_system::pallet_prelude::*;
use pallet_identity::Judgement;

/// Weight information for extrinsics in this pallet.
pub trait WeightInfo {
/// Weight for clearing judgement.
fn clear_judgement() -> Weight;
}

type IdentityPallet = pallet_identity::Pallet<Runtime>;

#[pallet::pallet]
Expand Down Expand Up @@ -65,7 +71,7 @@ pub mod pallet_identity_ops {
/// This is successful only if the `target` account has judgements to clear. The transaction
/// fee is refunded to the caller if successful.
#[pallet::call_index(0)]
#[pallet::weight({ 0 })] // TODO generate weights
#[pallet::weight(weights::pallet_identity_ops::WeightInfo::<Runtime>::clear_judgement())]
pub fn clear_judgement(
_origin: OriginFor<T>,
target: AccountId,
Expand Down
1 change: 1 addition & 0 deletions system-parachains/people/people-kusama/src/weights/mod.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a0a05c1

Please sign in to comment.