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).
|
// TaprootMerkleBranch can only have len atmost 128(TAPROOT_CONTROL_MAX_NODE_COUNT).
|
||||||
// safe to cast from usize to u8
|
// safe to cast from usize to u8
|
||||||
buf.push(leaf_info.merkle_branch.as_inner().len() as u8);
|
buf.push(leaf_info.merkle_branch().as_inner().len() as u8);
|
||||||
buf.push(leaf_info.ver.to_consensus());
|
buf.push(leaf_info.leaf_version().to_consensus());
|
||||||
leaf_info.script.consensus_encode(&mut buf).expect("Vecs dont err");
|
leaf_info.script().consensus_encode(&mut buf).expect("Vecs dont err");
|
||||||
}
|
}
|
||||||
buf
|
buf
|
||||||
}
|
}
|
||||||
|
|
|
@ -610,11 +610,11 @@ impl NodeInfo {
|
||||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||||
pub struct LeafInfo {
|
pub struct LeafInfo {
|
||||||
/// The underlying script.
|
/// The underlying script.
|
||||||
pub(crate) script: Script,
|
script: Script,
|
||||||
/// The leaf version.
|
/// The leaf version.
|
||||||
pub(crate) ver: LeafVersion,
|
ver: LeafVersion,
|
||||||
/// The merkle proof (hashing partners) to get this node.
|
/// The merkle proof (hashing partners) to get this node.
|
||||||
pub(crate) merkle_branch: TaprootMerkleBranch,
|
merkle_branch: TaprootMerkleBranch,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl LeafInfo {
|
impl LeafInfo {
|
||||||
|
|
Loading…
Reference in New Issue