introduce constant KEY_VERSION_0

This commit is contained in:
Riccardo Casatta 2021-07-16 16:46:57 +02:00
parent 417cfe31e3
commit 1a2b54ff23
No known key found for this signature in database
GPG Key ID: FD986A969E450397
1 changed files with 2 additions and 1 deletions

View File

@ -89,6 +89,7 @@ pub enum Prevouts<'u> {
}
const LEAF_VERSION_TAPSCRIPT: u8 = 0xc0;
const KEY_VERSION_0: u8 = 0u8;
/// Information related to the script path spending
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
@ -402,7 +403,7 @@ impl<R: Deref<Target = Transaction>> SigHashCache<R> {
let hash = TapLeafHash::from_engine(enc);
hash.into_inner().consensus_encode(&mut writer)?;
0u8.consensus_encode(&mut writer)?;
KEY_VERSION_0.consensus_encode(&mut writer)?;
code_separator_pos.consensus_encode(&mut writer)?;
}