diff --git a/hashes/src/sha256.rs b/hashes/src/sha256.rs index 9f7756594..a2a60758d 100644 --- a/hashes/src/sha256.rs +++ b/hashes/src/sha256.rs @@ -950,17 +950,17 @@ mod tests { // 32 bytes of zeroes representing "new asset" engine.input(&[0; 32]); - let total_bytes_hashed = 64; + // RPC output + static WANT: Midstate = sha256::Midstate::new([ + 0x0b, 0xcf, 0xe0, 0xe5, 0x4e, 0x6c, 0xc7, 0xd3, + 0x4f, 0x4f, 0x7c, 0x1d, 0xf0, 0xb0, 0xf5, 0x03, + 0xf2, 0xf7, 0x12, 0x91, 0x2a, 0x06, 0x05, 0xb4, + 0x14, 0xed, 0x33, 0x7f, 0x7f, 0x03, 0x2e, 0x03, + ], 64); assert_eq!( engine.midstate().expect("total_bytes_hashed is valid"), - // RPC output - sha256::Midstate::new([ - 0x0b, 0xcf, 0xe0, 0xe5, 0x4e, 0x6c, 0xc7, 0xd3, - 0x4f, 0x4f, 0x7c, 0x1d, 0xf0, 0xb0, 0xf5, 0x03, - 0xf2, 0xf7, 0x12, 0x91, 0x2a, 0x06, 0x05, 0xb4, - 0x14, 0xed, 0x33, 0x7f, 0x7f, 0x03, 0x2e, 0x03, - ], total_bytes_hashed) + WANT, ); }