Return the correct `LeafVersion` when building a Taproot `ControlBlock`

This commit is contained in:
Alekos Filini 2021-11-16 11:45:23 +01:00
parent 5aabd6371e
commit 0af5a433b6
No known key found for this signature in database
GPG Key ID: 431401E4A4530061
1 changed files with 1 additions and 1 deletions

View File

@ -337,7 +337,7 @@ impl TaprootSpendInfo {
Some(ControlBlock { Some(ControlBlock {
internal_key: self.internal_key, internal_key: self.internal_key,
output_key_parity: self.output_key_parity, output_key_parity: self.output_key_parity,
leaf_version: LeafVersion::default(), leaf_version: script_ver.1,
merkle_branch: smallest.clone(), merkle_branch: smallest.clone(),
}) })
} }