mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-16 10:45:42 +00:00
Fix weight for inner call with new origin (#7196)
* fix weight for inner call with new origin * fix
This commit is contained in:
committed by
GitHub
parent
a56f90fa9a
commit
6182878933
@@ -61,7 +61,7 @@ use sp_core::TypeId;
|
||||
use sp_io::hashing::blake2_256;
|
||||
use frame_support::{decl_module, decl_event, decl_storage, Parameter};
|
||||
use frame_support::{
|
||||
traits::{OriginTrait, UnfilteredDispatchable},
|
||||
traits::{OriginTrait, UnfilteredDispatchable, Get},
|
||||
weights::{Weight, GetDispatchInfo, DispatchClass}, dispatch::PostDispatchInfo,
|
||||
};
|
||||
use frame_system::{ensure_signed, ensure_root};
|
||||
@@ -185,7 +185,9 @@ decl_module! {
|
||||
/// The dispatch origin for this call must be _Signed_.
|
||||
#[weight = (
|
||||
T::WeightInfo::as_derivative()
|
||||
.saturating_add(call.get_dispatch_info().weight),
|
||||
.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,
|
||||
)]
|
||||
fn as_derivative(origin, index: u16, call: Box<<T as Trait>::Call>) -> DispatchResult {
|
||||
|
||||
Reference in New Issue
Block a user