From a6129d8626f5b87462b70eadbce2db08c9761cfd Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sun, 19 Apr 2020 17:15:48 +0200 Subject: Begin implement bucket management & admin commands --- src/block.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/block.rs') diff --git a/src/block.rs b/src/block.rs index d7daea01..c84f193b 100644 --- a/src/block.rs +++ b/src/block.rs @@ -98,7 +98,7 @@ impl BlockManager { Message::NeedBlockQuery(h) => { self2.need_block(&h).await.map(Message::NeedBlockReply) } - _ => Err(Error::Message(format!("Invalid RPC"))), + _ => Err(Error::BadRequest(format!("Unexpected RPC message"))), } } }); @@ -262,7 +262,7 @@ impl BlockManager { let garage = self.garage.load_full().unwrap(); let active_refs = garage .block_ref_table - .get_range(&hash, &[0u8; 32].into(), Some(()), 1) + .get_range(&hash, None, Some(()), 1) .await?; let needed_by_others = !active_refs.is_empty(); if needed_by_others { -- cgit v1.2.3