Skip to content

Commit

Permalink
push helper for test 9
Browse files Browse the repository at this point in the history
  • Loading branch information
MicroProofs committed May 26, 2024
1 parent 264a3af commit 4259862
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions lib/aiken/sparse_merkle_tree_blake256_test.ak
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,25 @@ test sparse_merkle_proof_8() {
expected_root == actual_root
}

fn helper_9_left_proofs() {
#"6a91502556c5251ffcd0c5e3a40628de24f9ee0b337b31f2f79b160c5915f64e"
|> bytearray.concat(leaf_byte, _)
|> hash.blake2b_256
|> bytearray.concat(#"fc")
|> bytearray.concat(
bytearray.concat(
leaf_byte,
#"55d5551e8e1323d35afe53cf8698867c9de9a408e97ee968dc8414d527cc719c",
)
|> hash.blake2b_256
|> bytearray.concat(#"fd"),
)
|> bytearray.concat(
#"283918a40948a0e69cd88d289b09c54c94300a9c0d379c8b55b8974ec30a3f8a",
)
|> bytearray.concat(#"fe")
}

test sparse_merkle_proof_9() {
let old_root =
#"5a812ad3240bc532aea6f0b8427ccf929a20bdd0a08bcad062207b14a65e9be8"
Expand All @@ -327,23 +346,7 @@ test sparse_merkle_proof_9() {

let data_serializer = identity

let left_proofs =
#"6a91502556c5251ffcd0c5e3a40628de24f9ee0b337b31f2f79b160c5915f64e"
|> bytearray.concat(leaf_byte, _)
|> hash.blake2b_256
|> bytearray.concat(#"fc")
|> bytearray.concat(
bytearray.concat(
leaf_byte,
#"55d5551e8e1323d35afe53cf8698867c9de9a408e97ee968dc8414d527cc719c",
)
|> hash.blake2b_256
|> bytearray.concat(#"fd"),
)
|> bytearray.concat(
#"283918a40948a0e69cd88d289b09c54c94300a9c0d379c8b55b8974ec30a3f8a",
)
|> bytearray.concat(#"fe")
let left_proofs = helper_9_left_proofs()

let proof_block =
MerkleProofBlock {
Expand Down

0 comments on commit 4259862

Please sign in to comment.