Fix weight for inner call with new origin (#7196)

* fix weight for inner call with new origin

* fix
This commit is contained in:
Guillaume Thiolliere authored and GitHub committed 2020-10-01 08:24:34 +00:00
1 parent a56f90fa9a
commit 6182878933
6 files changed
+39 -10

No files matched your search

+6 -2
View File
@@ -244,7 +244,9 @@ decl_module! {
#[weight = {
let di = call.get_dispatch_info();
(T::WeightInfo::proxy(T::MaxProxies::get().into())
.saturating_add(di.weight),
.saturating_add(di.weight)
// AccountData for inner call origin accountdata.
.saturating_add(T::DbWeight::get().reads_writes(1, 1)),
di.class)
}]
fn proxy(origin,
@@ -542,7 +544,9 @@ decl_module! {
#[weight = {
let di = call.get_dispatch_info();
(T::WeightInfo::proxy_announced(T::MaxPending::get(), T::MaxProxies::get().into())
.saturating_add(di.weight),
.saturating_add(di.weight)
// AccountData for inner call origin accountdata.
.saturating_add(T::DbWeight::get().reads_writes(1, 1)),
di.class)
}]
fn proxy_announced(origin,