Skip to content

Commit

Permalink
fix: pass closed range to blob range query
Browse files Browse the repository at this point in the history
  • Loading branch information
black-puppydog committed Jul 22, 2024
1 parent 1c377e3 commit a8f1f78
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions solar/src/storage/kv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@ impl KvStorage {
let mut list = Vec::new();

let db = self.db.as_ref().ok_or(Error::OptionIsNone)?;
let scan_key: &[u8] = &[PREFIX_BLOB];
for item in db.range(scan_key..) {
let scan_key_start: &[u8] = &[PREFIX_BLOB];
let scan_key_end: &[u8] = &[PREFIX_BLOB + 1];
for item in db.range(scan_key_start..scan_key_end) {
let (k, v) = item?;
let blob: BlobStatus = serde_cbor::from_slice(&v)?;
if !blob.retrieved {
Expand Down

0 comments on commit a8f1f78

Please sign in to comment.