Skip to content

Commit 2405417

Browse files
committed
Use TAPROOT_ANNEX_PREFIX in sighash module
1 parent 7010672 commit 2405417

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/util/sighash.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use core::fmt;
2727
use core::ops::{Deref, DerefMut};
2828
use hashes::{sha256, sha256d, Hash};
2929
use io;
30-
use util::taproot::{TapLeafHash, TapSighashHash};
30+
use util::taproot::{TapLeafHash, TAPROOT_ANNEX_PREFIX, TapSighashHash};
3131
use SigHash;
3232
use {Script, Transaction, TxOut};
3333

@@ -725,7 +725,7 @@ pub struct Annex<'a>(&'a [u8]);
725725
impl<'a> Annex<'a> {
726726
/// Creates a new `Annex` struct checking the first byte is `0x50`
727727
pub fn new(annex_bytes: &'a [u8]) -> Result<Self, Error> {
728-
if annex_bytes.first() == Some(&0x50) {
728+
if annex_bytes.first() == Some(&TAPROOT_ANNEX_PREFIX) {
729729
Ok(Annex(annex_bytes))
730730
} else {
731731
Err(Error::WrongAnnex)

0 commit comments

Comments
 (0)