Making all LeafInfo fields private
This commit is contained in:
parent
d655ff3e93
commit
3c502ffc2d
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue