aboutsummaryrefslogtreecommitdiff
path: root/src/block.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/block.rs')
-rw-r--r--src/block.rs4
1 files changed, 2 insertions, 2 deletions
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 {