Skip to content

Commit

Permalink
Making all LeafInfo fields private
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Apr 19, 2022
1 parent d655ff3 commit 3c502ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/util/psbt/serialize.rs
Expand Up @@ -327,9 +327,9 @@ impl Serialize for TapTree {
//
// TaprootMerkleBranch can only have len atmost 128(TAPROOT_CONTROL_MAX_NODE_COUNT).
// safe to cast from usize to u8
buf.push(leaf_info.merkle_branch.as_inner().len() as u8);
buf.push(leaf_info.ver.to_consensus());
leaf_info.script.consensus_encode(&mut buf).expect("Vecs dont err");
buf.push(leaf_info.merkle_branch().as_inner().len() as u8);
buf.push(leaf_info.leaf_version().to_consensus());
leaf_info.script().consensus_encode(&mut buf).expect("Vecs dont err");
}
buf
}
Expand Down
6 changes: 3 additions & 3 deletions src/util/taproot.rs
Expand Up @@ -610,11 +610,11 @@ impl NodeInfo {
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct LeafInfo {
/// The underlying script.
pub(crate) script: Script,
script: Script,
/// The leaf version.
pub(crate) ver: LeafVersion,
ver: LeafVersion,
/// The merkle proof (hashing partners) to get this node.
pub(crate) merkle_branch: TaprootMerkleBranch,
merkle_branch: TaprootMerkleBranch,
}

impl LeafInfo {
Expand Down

0 comments on commit 3c502ff

Please sign in to comment.