mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 23:57:56 +00:00
Compute weight only once. (#5780)
This commit is contained in:
@@ -1433,16 +1433,17 @@ macro_rules! decl_module {
|
||||
match *self {
|
||||
$(
|
||||
$call_type::$fn_name( $( ref $param_name ),* ) => {
|
||||
let base_weight = $weight;
|
||||
let weight = <dyn $crate::dispatch::WeighData<( $( & $param, )* )>>::weigh_data(
|
||||
&$weight,
|
||||
&base_weight,
|
||||
($( $param_name, )*)
|
||||
);
|
||||
let class = <dyn $crate::dispatch::ClassifyDispatch<( $( & $param, )* )>>::classify_dispatch(
|
||||
&$weight,
|
||||
&base_weight,
|
||||
($( $param_name, )*)
|
||||
);
|
||||
let pays_fee = <dyn $crate::dispatch::PaysFee<( $( & $param, )* )>>::pays_fee(
|
||||
&$weight,
|
||||
&base_weight,
|
||||
($( $param_name, )*)
|
||||
);
|
||||
$crate::dispatch::DispatchInfo {
|
||||
|
||||
Reference in New Issue
Block a user