From 242b67182c65a074a27901d33835dfd3bab5ba2b Mon Sep 17 00:00:00 2001 From: Antioch Peverell <30642645+antiochp@users.noreply.github.com> Date: Sat, 21 Apr 2018 14:14:43 -0400 Subject: [PATCH] use less cloning when validating a txhashset (#989) --- chain/src/txhashset.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chain/src/txhashset.rs b/chain/src/txhashset.rs index bf6717032..567a1fbd1 100644 --- a/chain/src/txhashset.rs +++ b/chain/src/txhashset.rs @@ -758,7 +758,7 @@ impl<'a> Extension<'a> { if pmmr::is_leaf(n) { if let Some(kernel) = self.kernel_pmmr.get_data(n) { kernel.verify()?; - commitments.push(kernel.excess.clone()); + commitments.push(kernel.excess); } } } @@ -820,7 +820,7 @@ impl<'a> Extension<'a> { for n in 1..self.output_pmmr.unpruned_size() + 1 { if pmmr::is_leaf(n) { if let Some(out) = self.output_pmmr.get_data(n) { - commitments.push(out.commit.clone()); + commitments.push(out.commit); } } }