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
2020-10-01 10:24:34 +02:00
committed by GitHub
parent a56f90fa9a
commit 6182878933
6 changed files with 39 additions and 10 deletions
+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,