Skip to content

Commit cf83cbf

Browse files
committed
Add further description to the NodeInfo struct
Further assist devs in understanding the `NodeInfo` struct by adding docs about when/why the struct is used.
1 parent f4f7a5d commit cf83cbf

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/util/taproot.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,8 +521,12 @@ impl TaprootBuilder {
521521

522522
/// Represents the node information in taproot tree.
523523
///
524-
/// You can use [`TaprootSpendInfo::from_node_info`] to a get [`TaprootSpendInfo`]
525-
/// from the merkle root [`NodeInfo`].
524+
/// Helper type used in merkle tree construction allowing one to build sparse merkle trees. The node
525+
/// represents part of the tree that has information about all of its descendants.
526+
/// See how [`TaprootBuilder`] works for more details.
527+
///
528+
/// You can use [`TaprootSpendInfo::from_node_info`] to a get a [`TaprootSpendInfo`] from the merkle
529+
/// root [`NodeInfo`].
526530
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
527531
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
528532
pub struct NodeInfo {

0 commit comments

Comments
 (0)