Skip to content

Commit

Permalink
chore: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
rymnc committed Jul 26, 2023
1 parent 5635f93 commit 6feb9e4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/memory_keccak.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ impl Database for MemoryDB {

Ok(())
}

fn close(&mut self) -> PmtreeResult<()> {
Ok(())
}

fn flush(&mut self) -> PmtreeResult<()> {
Ok(())
}
}

impl Hasher for MyKeccak {
Expand Down
16 changes: 16 additions & 0 deletions tests/sled_keccak.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,22 @@ impl Database for MySled {

Ok(())
}

fn close(&mut self) -> PmtreeResult<()> {
self.0.close().map_err(|_| {
PmtreeErrorKind::DatabaseError(DatabaseErrorKind::CustomError(
String::from("Error closing database"),
))
})
}

fn flush(&mut self) -> PmtreeResult<()> {
self.0.flush().map_err(|_| {
PmtreeErrorKind::DatabaseError(DatabaseErrorKind::CustomError(
String::from("Error flushing database"),
))
})
}
}

impl Hasher for MyKeccak {
Expand Down

0 comments on commit 6feb9e4

Please sign in to comment.