mirror of https://github.com/zcash/orchard.git
tree::MerklePath: Add postion() and auth_path() getters.
This commit is contained in:
parent
b3daeb0861
commit
380128ed49
10
src/tree.rs
10
src/tree.rs
|
@ -59,6 +59,16 @@ impl MerklePath {
|
||||||
});
|
});
|
||||||
Anchor(node.to_bytes())
|
Anchor(node.to_bytes())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns the position of the leaf using this Merkle path.
|
||||||
|
pub fn position(&self) -> u32 {
|
||||||
|
self.position
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns the authentication path.
|
||||||
|
pub fn auth_path(&self) -> [pallas::Base; MERKLE_DEPTH_ORCHARD] {
|
||||||
|
self.auth_path
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Pair {
|
struct Pair {
|
||||||
|
|
Loading…
Reference in New Issue