diff --git a/bitcoin/src/crypto/sighash.rs b/bitcoin/src/crypto/sighash.rs index b786c9836..56d07e69b 100644 --- a/bitcoin/src/crypto/sighash.rs +++ b/bitcoin/src/crypto/sighash.rs @@ -61,7 +61,6 @@ sha256t_hash_newtype! { /// Taproot-tagged hash with tag \"TapSighash\". /// /// This hash type is used for computing taproot signature hash." - #[hash_newtype(forward)] pub struct TapSighash(_); } diff --git a/bitcoin/src/taproot/mod.rs b/bitcoin/src/taproot/mod.rs index 60ce28ee0..87318ada4 100644 --- a/bitcoin/src/taproot/mod.rs +++ b/bitcoin/src/taproot/mod.rs @@ -36,7 +36,6 @@ sha256t_hash_newtype! { /// Taproot-tagged hash with tag \"TapLeaf\". /// /// This is used for computing tapscript script spend hash. - #[hash_newtype(forward)] pub struct TapLeafHash(_); pub struct TapBranchTag = hash_str("TapBranch"); @@ -44,7 +43,6 @@ sha256t_hash_newtype! { /// Tagged hash used in taproot trees. /// /// See BIP-340 for tagging rules. - #[hash_newtype(forward)] pub struct TapNodeHash(_); pub struct TapTweakTag = hash_str("TapTweak"); @@ -52,7 +50,6 @@ sha256t_hash_newtype! { /// Taproot-tagged hash with tag \"TapTweak\". /// /// This hash type is used while computing the tweaked public key. - #[hash_newtype(forward)] pub struct TapTweakHash(_); } diff --git a/hashes/src/sha256t.rs b/hashes/src/sha256t.rs index 6a32831c1..6627048cc 100644 --- a/hashes/src/sha256t.rs +++ b/hashes/src/sha256t.rs @@ -66,7 +66,7 @@ impl core::hash::Hash for Hash { fn hash(&self, h: &mut H) { self.0.hash(h) } } -crate::internal_macros::hash_trait_impls!(256, true, T: Tag); +crate::internal_macros::hash_trait_impls!(256, false, T: Tag); fn from_engine(e: sha256::HashEngine) -> Hash { use crate::Hash as _; @@ -199,7 +199,7 @@ mod tests { #[test] #[cfg(feature = "alloc")] fn manually_created_sha256t_hash_type() { - assert_eq!(TestHash::hash(&[0]).to_string(), HASH_ZERO_BACKWARD); + assert_eq!(TestHash::hash(&[0]).to_string(), HASH_ZERO_FORWARD); } // We also provide a macro to create the tag and the hash type.