diff --git a/consensus/src/tx.rs b/consensus/src/tx.rs index 56dc0a0d..4be298cc 100644 --- a/consensus/src/tx.rs +++ b/consensus/src/tx.rs @@ -51,6 +51,10 @@ pub struct Txid( Bytes32StrRev, ); +impl From for [u8; 32] { + fn from(txid: Txid) -> Self { txid.to_byte_array() } +} + impl Txid { #[inline] pub const fn coinbase() -> Self { Self(Bytes32StrRev::zero()) }