mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 00:31:07 +00:00
Store dispatch info of calls locally in weight calculation (#7849)
* utility * sudo * more * recovery * better formatting
This commit is contained in:
@@ -223,13 +223,16 @@ decl_module! {
|
||||
/// - DB Weight: None
|
||||
/// - Plus Call Weight
|
||||
/// # </weight>
|
||||
#[weight = (
|
||||
T::WeightInfo::as_multi_threshold_1(call.using_encoded(|c| c.len() as u32))
|
||||
.saturating_add(call.get_dispatch_info().weight)
|
||||
// AccountData for inner call origin accountdata.
|
||||
.saturating_add(T::DbWeight::get().reads_writes(1, 1)),
|
||||
call.get_dispatch_info().class,
|
||||
)]
|
||||
#[weight = {
|
||||
let dispatch_info = call.get_dispatch_info();
|
||||
(
|
||||
T::WeightInfo::as_multi_threshold_1(call.using_encoded(|c| c.len() as u32))
|
||||
.saturating_add(dispatch_info.weight)
|
||||
// AccountData for inner call origin accountdata.
|
||||
.saturating_add(T::DbWeight::get().reads_writes(1, 1)),
|
||||
dispatch_info.class,
|
||||
)
|
||||
}]
|
||||
fn as_multi_threshold_1(origin,
|
||||
other_signatories: Vec<T::AccountId>,
|
||||
call: Box<<T as Config>::Call>,
|
||||
|
||||
Reference in New Issue
Block a user