Small things
This commit is contained in:
parent
fc2bc8b0ca
commit
368414a261
2 changed files with 9 additions and 2 deletions
|
@ -381,7 +381,7 @@ impl BlockStoreIterator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns progress done, between 0% and 1%
|
/// Returns progress done, between 0 and 1
|
||||||
fn progress(&self) -> f32 {
|
fn progress(&self) -> f32 {
|
||||||
if self.path.is_empty() {
|
if self.path.is_empty() {
|
||||||
1.0
|
1.0
|
||||||
|
@ -453,7 +453,6 @@ impl BlockStoreIterator {
|
||||||
if name.len() == 2 && hex::decode(&name).is_ok() && ent_type.is_dir() {
|
if name.len() == 2 && hex::decode(&name).is_ok() && ent_type.is_dir() {
|
||||||
let path = data_dir_ent.path();
|
let path = data_dir_ent.path();
|
||||||
self.path.push(ReadingDir::Pending(path));
|
self.path.push(ReadingDir::Pending(path));
|
||||||
continue;
|
|
||||||
} else if name.len() == 64 {
|
} else if name.len() == 64 {
|
||||||
let hash_bytes = if let Ok(h) = hex::decode(&name) {
|
let hash_bytes = if let Ok(h) = hex::decode(&name) {
|
||||||
h
|
h
|
||||||
|
|
|
@ -85,6 +85,10 @@ impl Worker for RepairVersionsWorker {
|
||||||
"Version repair worker".into()
|
"Version repair worker".into()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn info(&self) -> Option<String> {
|
||||||
|
Some(format!("{} items done", self.counter))
|
||||||
|
}
|
||||||
|
|
||||||
async fn work(
|
async fn work(
|
||||||
&mut self,
|
&mut self,
|
||||||
_must_exit: &mut watch::Receiver<bool>,
|
_must_exit: &mut watch::Receiver<bool>,
|
||||||
|
@ -165,6 +169,10 @@ impl Worker for RepairBlockrefsWorker {
|
||||||
"Block refs repair worker".into()
|
"Block refs repair worker".into()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn info(&self) -> Option<String> {
|
||||||
|
Some(format!("{} items done", self.counter))
|
||||||
|
}
|
||||||
|
|
||||||
async fn work(
|
async fn work(
|
||||||
&mut self,
|
&mut self,
|
||||||
_must_exit: &mut watch::Receiver<bool>,
|
_must_exit: &mut watch::Receiver<bool>,
|
||||||
|
|
Loading…
Reference in a new issue