diff --git a/src/util/sighash.rs b/src/util/sighash.rs index 112a4cc2..fb62b444 100644 --- a/src/util/sighash.rs +++ b/src/util/sighash.rs @@ -27,7 +27,7 @@ use core::fmt; use core::ops::{Deref, DerefMut}; use hashes::{sha256, sha256d, Hash}; use io; -use util::taproot::{TapLeafHash, TapSighashHash}; +use util::taproot::{TapLeafHash, TAPROOT_ANNEX_PREFIX, TapSighashHash}; use SigHash; use {Script, Transaction, TxOut}; @@ -725,7 +725,7 @@ pub struct Annex<'a>(&'a [u8]); impl<'a> Annex<'a> { /// Creates a new `Annex` struct checking the first byte is `0x50` pub fn new(annex_bytes: &'a [u8]) -> Result { - if annex_bytes.first() == Some(&0x50) { + if annex_bytes.first() == Some(&TAPROOT_ANNEX_PREFIX) { Ok(Annex(annex_bytes)) } else { Err(Error::WrongAnnex)