From 0af5a433b67e1503a3c7958b9b80928973d4bf64 Mon Sep 17 00:00:00 2001 From: Alekos Filini Date: Tue, 16 Nov 2021 11:45:23 +0100 Subject: [PATCH] Return the correct `LeafVersion` when building a Taproot `ControlBlock` --- src/util/taproot.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/taproot.rs b/src/util/taproot.rs index 72754c75..86804622 100644 --- a/src/util/taproot.rs +++ b/src/util/taproot.rs @@ -337,7 +337,7 @@ impl TaprootSpendInfo { Some(ControlBlock { internal_key: self.internal_key, output_key_parity: self.output_key_parity, - leaf_version: LeafVersion::default(), + leaf_version: script_ver.1, merkle_branch: smallest.clone(), }) }