merkle-tree: Make instantiation a little less painful (#5037)

automerge
This commit is contained in:
Trent Nelson
2019-07-11 16:15:08 -06:00
committed by Grimes
parent 5b95685e12
commit 5698d48dc8
2 changed files with 4 additions and 3 deletions

View File

@ -175,7 +175,7 @@ pub fn hash_transactions(transactions: &[Transaction]) -> Hash {
// a hash of a slice of transactions only needs to hash the signatures
let signatures: Vec<_> = transactions
.iter()
.flat_map(|tx| tx.signatures.iter().map(|sig| sig.as_ref()))
.flat_map(|tx| tx.signatures.iter())
.collect();
let merkle_tree = MerkleTree::new(&signatures);
if let Some(root_hash) = merkle_tree.get_root() {