You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let expected = Hash256::try_from("h:72b0762b382d4c251af5ae25b6777d908726d75962e5224f98d7f619bb39515d").unwrap();
276
276
assert_eq!(hash, expected)
277
277
}
278
-
278
+
279
279
fn test_hash_blake2b_pair(){
280
280
let left:[u8;32] = hex::decode("cdcce3978a58ceb6c8480d218646db4eae85eb9ea9c2f5138fbacb4ce2c701e3")
281
281
.unwrap()
@@ -285,36 +285,36 @@ mod test {
285
285
.unwrap()
286
286
.try_into()
287
287
.unwrap();
288
-
288
+
289
289
let hash = hash_blake2b_pair(&NODE_HASH_PREFIX,&left,&right);
290
290
let expected = Hash256::try_from("h:72b0762b382d4c251af5ae25b6777d908726d75962e5224f98d7f619bb39515d").unwrap();
291
291
assert_eq!(hash, expected)
292
292
}
293
-
293
+
294
294
fn test_timelock_leaf(){
295
295
let hash = timelock_leaf(0);
296
296
let expected = Hash256(STANDARD_TIMELOCK_BLAKE2B_HASH);
297
297
assert_eq!(hash, expected)
298
298
}
299
-
299
+
300
300
fn test_sigs_required_leaf(){
301
301
let hash = sigs_required_leaf(1u64);
302
302
let expected = Hash256(STANDARD_SIGS_REQUIRED_BLAKE2B_HASH);
303
303
assert_eq!(hash, expected)
304
304
}
305
-
305
+
306
306
fn test_hash_blake2b_single(){
307
307
let hash = hash_blake2b_single(&hex::decode("006564323535313900000000000000000020000000000000000102030000000000000000000000000000000000000000000000000000000000").unwrap());
308
308
let expected = Hash256::try_from("h:21ce940603a2ee3a283685f6bfb4b122254894fd1ed3eb59434aadbf00c75d5b").unwrap();
0 commit comments