Improve overall performance (#6699)

* Improve overall performance

* Clean up code

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Remove needless ::

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Remove needless ::

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
pscott
2020-07-21 14:46:49 +02:00
committed by GitHub
parent ab82eb1c98
commit 046fda914a
73 changed files with 141 additions and 144 deletions
+2 -2
View File
@@ -295,12 +295,12 @@ decl_module! {
ensure!(!other_signatories.is_empty(), Error::<T>::TooFewSignatories);
let other_signatories_len = other_signatories.len();
ensure!(other_signatories_len < max_sigs, Error::<T>::TooManySignatories);
let signatories = Self::ensure_sorted_and_insert(other_signatories, who.clone())?;
let signatories = Self::ensure_sorted_and_insert(other_signatories, who)?;
let id = Self::multi_account_id(&signatories, 1);
let call_len = call.using_encoded(|c| c.len());
let result = call.dispatch(RawOrigin::Signed(id.clone()).into());
let result = call.dispatch(RawOrigin::Signed(id).into());
result.map(|post_dispatch_info| post_dispatch_info.actual_weight
.map(|actual_weight| weight_of::as_multi_threshold_1::<T>(