Use as_byte_array to encode hash type
Instead of accessing the inner type of a hash wrapper type when consensus encoding we can call `as_byte_array()`. Done in preparation for moving `Txid` and `Wtxid` to `primitives`. Internal change only.
This commit is contained in:
parent
6fac593ec9
commit
98328b5a7b
|
@ -181,7 +181,7 @@ macro_rules! impl_hashencode {
|
|||
($hashtype:ident) => {
|
||||
impl $crate::consensus::Encodable for $hashtype {
|
||||
fn consensus_encode<W: $crate::io::Write + ?Sized>(&self, w: &mut W) -> core::result::Result<usize, $crate::io::Error> {
|
||||
self.0.consensus_encode(w)
|
||||
self.as_byte_array().consensus_encode(w)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue