From 780198d1556a702ddb73ed470805ee02f7b52fe0 Mon Sep 17 00:00:00 2001 From: NikVolf Date: Mon, 11 Mar 2019 17:42:47 +0300 Subject: [PATCH] actually, always reverse hah --- verification/src/sprout.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/verification/src/sprout.rs b/verification/src/sprout.rs index b80dbea5..028ad372 100644 --- a/verification/src/sprout.rs +++ b/verification/src/sprout.rs @@ -24,15 +24,6 @@ mod tests { use super::compute_hsig; fn hash(s: &'static str) -> [u8; 32] { - use hex::FromHex; - let bytes: Vec = s.from_hex().expect(&format!("hash '{}' is not actually a hash somehow", s)); - assert_eq!(bytes.len(), 32); - let mut result = [0u8; 32]; - result.copy_from_slice(&bytes[..]); - result - } - - fn reversed_hash(s: &'static str) -> [u8; 32] { use hex::FromHex; let mut bytes: Vec = s.from_hex().expect(&format!("hash '{}' is not actually a hash somehow", s)); bytes.reverse(); @@ -53,7 +44,7 @@ mod tests { ], hash("6464646464646464646464646464646464646464646464646464646464646464"), ), - reversed_hash("a8cba69f1fa329c055756b4af900f8a00b61e44f4cb8a1824ceb58b90a5b8113"), + hash("a8cba69f1fa329c055756b4af900f8a00b61e44f4cb8a1824ceb58b90a5b8113"), ); }