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.
This commit is contained in:
Tobin Harding 2022-03-31 10:57:37 +11:00
parent 492ccebd99
commit da731c4825
1 changed files with 6 additions and 2 deletions

View File

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