Push `merkle_branch` module one level deeper.

This moves the content of the module into `buf` submodule making future
changes clearer.
This commit is contained in:
Martin Habovstiak 2025-03-15 19:38:48 +01:00
parent 277045bad7
commit 33d75659da
2 changed files with 10 additions and 1 deletions

View File

@ -92,7 +92,7 @@ impl TaprootMerkleBranchBuf {
} }
/// Appends elements to proof. /// Appends elements to proof.
pub(super) fn push(&mut self, h: TapNodeHash) -> Result<(), InvalidMerkleTreeDepthError> { pub(in super::super) fn push(&mut self, h: TapNodeHash) -> Result<(), InvalidMerkleTreeDepthError> {
if self.len() >= TAPROOT_CONTROL_MAX_NODE_COUNT { if self.len() >= TAPROOT_CONTROL_MAX_NODE_COUNT {
Err(InvalidMerkleTreeDepthError(self.0.len())) Err(InvalidMerkleTreeDepthError(self.0.len()))
} else { } else {

View File

@ -0,0 +1,9 @@
//! Contains `TaprootMerkleBranchBuf` and its associated types.
mod buf;
pub use buf::TaprootMerkleBranchBuf;
use super::{
InvalidMerkleBranchSizeError, InvalidMerkleTreeDepthError, TapNodeHash, TaprootError,
TAPROOT_CONTROL_MAX_NODE_COUNT, TAPROOT_CONTROL_NODE_SIZE,
};