mirror of
https://github.com/vacp2p/pmtree.git
synced 2025-02-17 17:56:26 +00:00
feat: implement default function
This commit is contained in:
parent
3a7b3a1a51
commit
64fa7afbe7
@ -42,6 +42,13 @@ where
|
||||
D: Database,
|
||||
H: Hasher,
|
||||
{
|
||||
/// Creates tree with specified depth and default dbpath.
|
||||
///
|
||||
/// USE FOR IN-MEMORY DATABASE ONLY!
|
||||
pub fn default(depth: usize) -> Result<Self> {
|
||||
Self::new(depth, "")
|
||||
}
|
||||
|
||||
/// Creates new `MerkleTree` and store it to the specified path/db
|
||||
pub fn new(depth: usize, dbpath: &str) -> Result<Self> {
|
||||
// Create new db instance
|
||||
|
Loading…
x
Reference in New Issue
Block a user