diff --git a/hashes/src/lib.rs b/hashes/src/lib.rs index c8ac1e2d3..8759693cd 100644 --- a/hashes/src/lib.rs +++ b/hashes/src/lib.rs @@ -265,15 +265,15 @@ pub trait Hash: /// Length of the hash, in bytes. const LEN: usize = Self::Bytes::LEN; + /// Flag indicating whether user-visible serializations of this hash should be backward. + /// + /// For some reason Satoshi decided this should be true for `Sha256dHash`, so here we are. + const DISPLAY_BACKWARD: bool = false; + /// Copies a byte slice into a hash object. #[deprecated(since = "TBD", note = "use `from_byte_array` instead")] fn from_slice(sl: &[u8]) -> Result; - /// Flag indicating whether user-visible serializations of this hash - /// should be backward. For some reason Satoshi decided this should be - /// true for `Sha256dHash`, so here we are. - const DISPLAY_BACKWARD: bool = false; - /// Returns the underlying byte array. fn to_byte_array(self) -> Self::Bytes;