We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d09e922 commit a3360b6Copy full SHA for a3360b6
src/util/taproot.rs
@@ -683,13 +683,13 @@ impl TaprootMerkleBranch {
683
Err(TaprootError::InvalidMerkleTreeDepth(sl.len() / TAPROOT_CONTROL_NODE_SIZE))
684
} else {
685
let inner = sl
686
- // TODO: Use chunks_exact after MSRV changes to 1.31
687
- .chunks(TAPROOT_CONTROL_NODE_SIZE)
+ .chunks_exact(TAPROOT_CONTROL_NODE_SIZE)
688
.map(|chunk| {
689
sha256::Hash::from_slice(chunk)
690
- .expect("chunk exact always returns the correct size")
+ .expect("chunks_exact always returns the correct size")
691
})
692
.collect();
+
693
Ok(TaprootMerkleBranch(inner))
694
}
695
0 commit comments