Improve braces usage
Add a pair of braces to improve readability.
This commit is contained in:
parent
39ec59620d
commit
6d84998168
|
@ -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())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue