We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7010672 commit 2405417Copy full SHA for 2405417
src/util/sighash.rs
@@ -27,7 +27,7 @@ use core::fmt;
27
use core::ops::{Deref, DerefMut};
28
use hashes::{sha256, sha256d, Hash};
29
use io;
30
-use util::taproot::{TapLeafHash, TapSighashHash};
+use util::taproot::{TapLeafHash, TAPROOT_ANNEX_PREFIX, TapSighashHash};
31
use SigHash;
32
use {Script, Transaction, TxOut};
33
@@ -725,7 +725,7 @@ pub struct Annex<'a>(&'a [u8]);
725
impl<'a> Annex<'a> {
726
/// Creates a new `Annex` struct checking the first byte is `0x50`
727
pub fn new(annex_bytes: &'a [u8]) -> Result<Self, Error> {
728
- if annex_bytes.first() == Some(&0x50) {
+ if annex_bytes.first() == Some(&TAPROOT_ANNEX_PREFIX) {
729
Ok(Annex(annex_bytes))
730
} else {
731
Err(Error::WrongAnnex)
0 commit comments