From 3b7ade9e78ae3f8662421973a4d09f48a408981d Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Wed, 6 Mar 2019 10:19:07 +0100 Subject: [PATCH] backup/datastore: expose insert_chunk method Signed-off-by: Wolfgang Bumiller --- src/backup/datastore.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/backup/datastore.rs b/src/backup/datastore.rs index 6cbb9680..a0e69b09 100644 --- a/src/backup/datastore.rs +++ b/src/backup/datastore.rs @@ -243,4 +243,16 @@ impl DataStore { Ok(()) } + + pub fn insert_chunk(&self, chunk: &[u8]) -> Result<(bool, [u8; 32], u64), Error> { + self.chunk_store.insert_chunk(chunk) + } + + pub fn insert_chunk_noverify( + &self, + digest: &[u8; 32], + chunk: &[u8], + ) -> Result<(bool, u64), Error> { + self.chunk_store.insert_chunk_noverify(digest, chunk) + } }