Improve braces usage

Add a pair of braces to improve readability.
This commit is contained in:
Tobin Harding 2022-01-24 11:26:04 +11:00
parent 39ec59620d
commit 6d84998168
1 changed files with 2 additions and 2 deletions

View File

@ -238,14 +238,14 @@ impl Block {
/// Computes the merkle root of transactions hashed for witness. /// Computes the merkle root of transactions hashed for witness.
pub fn witness_root(&self) -> Option<WitnessMerkleNode> { pub fn witness_root(&self) -> Option<WitnessMerkleNode> {
let hashes = self.txdata.iter().enumerate().map(|(i, t)| let hashes = self.txdata.iter().enumerate().map(|(i, t)| {
if i == 0 { if i == 0 {
// Replace the first hash with zeroes. // Replace the first hash with zeroes.
Wtxid::default().as_hash() Wtxid::default().as_hash()
} else { } else {
t.wtxid().as_hash() t.wtxid().as_hash()
} }
); });
bitcoin_merkle_root(hashes).map(|h| h.into()) bitcoin_merkle_root(hashes).map(|h| h.into())
} }