mirror of
https://github.com/mimblewimble/grin.git
synced 2025-02-01 17:01:09 +03:00
use less cloning when validating a txhashset (#989)
This commit is contained in:
parent
c36e72d8c9
commit
242b67182c
1 changed files with 2 additions and 2 deletions
|
@ -758,7 +758,7 @@ impl<'a> Extension<'a> {
|
||||||
if pmmr::is_leaf(n) {
|
if pmmr::is_leaf(n) {
|
||||||
if let Some(kernel) = self.kernel_pmmr.get_data(n) {
|
if let Some(kernel) = self.kernel_pmmr.get_data(n) {
|
||||||
kernel.verify()?;
|
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 {
|
for n in 1..self.output_pmmr.unpruned_size() + 1 {
|
||||||
if pmmr::is_leaf(n) {
|
if pmmr::is_leaf(n) {
|
||||||
if let Some(out) = self.output_pmmr.get_data(n) {
|
if let Some(out) = self.output_pmmr.get_data(n) {
|
||||||
commitments.push(out.commit.clone());
|
commitments.push(out.commit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue