diff --git a/bitcoin/src/internal_macros.rs b/bitcoin/src/internal_macros.rs index e59f2f4e1..208dbb688 100644 --- a/bitcoin/src/internal_macros.rs +++ b/bitcoin/src/internal_macros.rs @@ -181,7 +181,7 @@ macro_rules! impl_hashencode { ($hashtype:ident) => { impl $crate::consensus::Encodable for $hashtype { fn consensus_encode(&self, w: &mut W) -> core::result::Result { - self.0.consensus_encode(w) + self.as_byte_array().consensus_encode(w) } }