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
@@ -409,7 +409,7 @@ where
},
body: if get_body {
self.chain.block_body(&BlockId::Hash(hash))?
.unwrap_or(Vec::new())
.unwrap_or_default()
.iter_mut()
.map(|extrinsic| extrinsic.encode())
.collect()
@@ -418,7 +418,7 @@ where
},
receipt: Vec::new(),
message_queue: Vec::new(),
justification: justification.unwrap_or(Vec::new()),
justification: justification.unwrap_or_default(),
is_empty_justification,
};