Fix a bug in the merkle algorithm

This commit is contained in:
Luke Parker
2023-04-12 10:52:28 -04:00
parent d5a12a9b97
commit ff5c240fcc
2 changed files with 35 additions and 1 deletions

View File

@@ -18,7 +18,7 @@ pub(crate) fn merkle(hash_args: &[[u8; 32]]) -> [u8; 32] {
b"branch_hash".as_ref(),
hashes[i].as_ref(),
hashes
.get(i + i)
.get(i + 1)
.map(|hash| {
let res: &[u8] = hash.as_ref();
res