mirror of https://github.com/zcash/orchard.git
Expose `Anchor::empty_tree`.
This commit is contained in:
parent
3845686a6e
commit
189257391a
|
@ -11,6 +11,7 @@ and this project adheres to Rust's notion of
|
||||||
- `orchard::builder::BundleType`
|
- `orchard::builder::BundleType`
|
||||||
- `orchard::builder::OutputInfo`
|
- `orchard::builder::OutputInfo`
|
||||||
- `orchard::bundle::Flags::{ENABLED, SPENDS_DISABLED, OUTPUTS_DISABLED}`
|
- `orchard::bundle::Flags::{ENABLED, SPENDS_DISABLED, OUTPUTS_DISABLED}`
|
||||||
|
- `orchard::tree::Anchor::empty_tree`
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- `orchard::builder::Builder::new` now takes the bundle type to be used
|
- `orchard::builder::Builder::new` now takes the bundle type to be used
|
||||||
|
|
|
@ -58,7 +58,12 @@ impl From<MerkleHashOrchard> for Anchor {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Anchor {
|
impl Anchor {
|
||||||
pub(crate) fn empty_tree() -> Anchor {
|
/// The anchor of the empty Orchard note commitment tree.
|
||||||
|
///
|
||||||
|
/// This anchor does not correspond to any valid anchor for a spend, so it
|
||||||
|
/// may only be used for coinbase bundles or in circumstances where Orchard
|
||||||
|
/// functionality is not active.
|
||||||
|
pub fn empty_tree() -> Anchor {
|
||||||
Anchor(MerkleHashOrchard::empty_root(Level::from(MERKLE_DEPTH_ORCHARD as u8)).0)
|
Anchor(MerkleHashOrchard::empty_root(Level::from(MERKLE_DEPTH_ORCHARD as u8)).0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue