From b48ca050f99efc74a51bf808551d72cf8d6f874e Mon Sep 17 00:00:00 2001 From: "Jamil Lambert, PhD" Date: Tue, 25 Jun 2024 10:36:13 +0100 Subject: [PATCH] Remove tap tree tap tree should be either Taproot tree in normal language or [`TapTree`] when referring to the struct. Change all occurances of tap tree or taptree. --- bitcoin/src/taproot/merkle_branch.rs | 2 +- bitcoin/src/taproot/mod.rs | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/bitcoin/src/taproot/merkle_branch.rs b/bitcoin/src/taproot/merkle_branch.rs index 9b669fe41..49b0cf67e 100644 --- a/bitcoin/src/taproot/merkle_branch.rs +++ b/bitcoin/src/taproot/merkle_branch.rs @@ -10,7 +10,7 @@ use super::{ }; use crate::prelude::{Borrow, BorrowMut, Box, Vec}; -/// The merkle proof for inclusion of a tree in a taptree hash. +/// The merkle proof for inclusion of a tree in a Taproot tree hash. #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "actual_serde"))] diff --git a/bitcoin/src/taproot/mod.rs b/bitcoin/src/taproot/mod.rs index 2101a81fe..723d1468a 100644 --- a/bitcoin/src/taproot/mod.rs +++ b/bitcoin/src/taproot/mod.rs @@ -342,7 +342,7 @@ pub struct TaprootBuilder { // For each level in the tree, one NodeInfo object may be present. Branch at index 0 is // information about the root; further values are for deeper subtrees being explored. // - // During the construction of Taptree, for every right branch taken to reach the position we're + // During the construction of [`TapTree`], for every right branch taken to reach the position we're // currently working on, there will be a `(Some(_))` entry in branch corresponding to the left // branch at that level. // @@ -596,9 +596,9 @@ impl Default for TaprootBuilder { #[derive(Debug, Clone, PartialEq, Eq)] #[non_exhaustive] pub enum IncompleteBuilderError { - /// Indicates an attempt to construct a tap tree from a builder containing incomplete branches. + /// Indicates an attempt to construct a Taproot tree from a builder containing incomplete branches. NotFinalized(TaprootBuilder), - /// Indicates an attempt to construct a tap tree from a builder containing hidden parts. + /// Indicates an attempt to construct a Taproot tree from a builder containing hidden parts. HiddenParts(TaprootBuilder), } @@ -621,9 +621,9 @@ impl core::fmt::Display for IncompleteBuilderError { f.write_str(match self { NotFinalized(_) => - "an attempt to construct a tap tree from a builder containing incomplete branches.", + "an attempt to construct a Taproot tree from a builder containing incomplete branches.", HiddenParts(_) => - "an attempt to construct a tap tree from a builder containing hidden parts.", + "an attempt to construct a Taproot tree from a builder containing hidden parts.", }) } } @@ -644,7 +644,7 @@ impl std::error::Error for IncompleteBuilderError { #[derive(Debug, Clone, PartialEq, Eq)] #[non_exhaustive] pub enum HiddenNodesError { - /// Indicates an attempt to construct a tap tree from a builder containing hidden parts. + /// Indicates an attempt to construct a Taproot tree from a builder containing hidden parts. HiddenParts(NodeInfo), } @@ -667,7 +667,7 @@ impl core::fmt::Display for HiddenNodesError { f.write_str(match self { HiddenParts(_) => - "an attempt to construct a tap tree from a node_info containing hidden parts.", + "an attempt to construct a Taproot tree from a node_info containing hidden parts.", }) } } @@ -1000,7 +1000,7 @@ impl LeafNode { Self { leaf: TapLeaf::Hidden(hash), merkle_branch: Default::default() } } - /// Returns the depth of this script leaf in the tap tree. + /// Returns the depth of this script leaf in the Taproot tree. #[inline] pub fn depth(&self) -> u8 { // Depth is guarded by TAPROOT_CONTROL_MAX_NODE_COUNT. @@ -1157,7 +1157,7 @@ impl ControlBlock { /// Verifies that a control block is correct proof for a given output key and script. /// - /// Only checks that script is contained inside the taptree described by output key. Full + /// Only checks that script is contained inside the [`TapTree`] described by output key. Full /// verification must also execute the script with witness data. pub fn verify_taproot_commitment( &self, @@ -1394,7 +1394,7 @@ pub enum TaprootError { InvalidControlBlockSize(InvalidControlBlockSizeError), /// Invalid Taproot internal key. InvalidInternalKey(secp256k1::Error), - /// Empty tap tree. + /// Empty Taproot tree. EmptyTree, }