Skip to content

Commit

Permalink
Remove unused/unnecessary code from ironfish::test_utils
Browse files Browse the repository at this point in the history
  • Loading branch information
andiflabs committed Dec 4, 2024
1 parent 1a313d2 commit 6807a81
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions ironfish-rust/src/test_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ use rand::{thread_rng, Rng};
/// path placing that note at a random location in a Merkle tree.
pub fn make_fake_witness(note: &Note) -> Witness {
let mut rng = thread_rng();
let mut buffer = [0u8; 64];
thread_rng().fill(&mut buffer[..]);

let mut witness_auth_path = vec![];
for _ in 0..TREE_DEPTH {
witness_auth_path.push(match rng.gen() {
Expand Down Expand Up @@ -49,10 +46,10 @@ pub(crate) fn auth_path_to_root_hash(
for (i, node) in auth_path.iter().enumerate() {
cur = match node {
WitnessNode::Left(ref sibling_hash) => {
MerkleNoteHash::combine_hash(i, &cur, &sibling_hash.clone())
MerkleNoteHash::combine_hash(i, &cur, sibling_hash)
}
WitnessNode::Right(ref sibling_hash) => {
MerkleNoteHash::combine_hash(i, &sibling_hash.clone(), &cur)
MerkleNoteHash::combine_hash(i, sibling_hash, &cur)
}
}
}
Expand Down

0 comments on commit 6807a81

Please sign in to comment.