diff --git a/src/database.rs b/src/database.rs index 51b3bfc..9510f61 100644 --- a/src/database.rs +++ b/src/database.rs @@ -23,6 +23,6 @@ pub trait Database { /// Puts the value to the db by the key fn put(&mut self, key: DBKey, value: Value) -> PmtreeResult<()>; - /// Batc + /// Puts the leaves batch to the db fn put_batch(&mut self, subtree: HashMap) -> PmtreeResult<()>; } diff --git a/src/lib.rs b/src/lib.rs index a202a54..ac73371 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,6 +22,7 @@ pub type DBKey = [u8; 8]; /// Denotes values in a database pub type Value = Vec; +/// Denotes pmtree Merkle tree errors #[derive(Debug)] pub enum TreeErrorKind { MerkleTreeIsFull, @@ -30,6 +31,7 @@ pub enum TreeErrorKind { CustomError(String), } +/// Denotes pmtree database errors #[derive(Debug)] pub enum DatabaseErrorKind { CannotLoadDatabase, @@ -37,6 +39,7 @@ pub enum DatabaseErrorKind { CustomError(String), } +/// Denotes pmtree errors #[derive(Debug)] pub enum PmtreeErrorKind { /// Error in database