Skip to content

Commit

Permalink
small weight function refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
vedhavyas committed Feb 28, 2025
1 parent 6dcee21 commit 3d2ae6e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions crates/pallet-subspace/src/extensions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,8 @@ where
type Pre = ExtensionWeightData;

fn weight(&self, call: &RuntimeCallFor<Runtime>) -> Weight {
let subspace_call = match call.maybe_subspace_call() {
Some(subspace_call) => subspace_call,
None => return Weight::zero(),
};

match subspace_call {
SubspaceCall::vote { .. } => Self::max_weight(),
match call.maybe_subspace_call() {
Some(SubspaceCall::vote { .. }) => Self::max_weight(),
_ => Weight::zero(),
}
}
Expand Down

0 comments on commit 3d2ae6e

Please sign in to comment.