mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
debug
This commit is contained in:
@ -81,16 +81,15 @@ where
|
||||
Arc::new(tokio::sync::Mutex::new(HashSet::new()));
|
||||
|
||||
tokio::spawn({
|
||||
warn!("hlfs: backfiller started");
|
||||
let backfiller = backfiller.clone();
|
||||
async move {
|
||||
loop {
|
||||
let mut bf = backfiller.lock().await;
|
||||
warn!("hlfs: backfiller started");
|
||||
if bf.client.max_block < bf.max_block_seen {
|
||||
let block = bf.client.max_block + 1;
|
||||
let _ = bf.fetch_if_missing(block).await;
|
||||
}
|
||||
|
||||
sleep(Duration::from_secs(1)).await;
|
||||
}
|
||||
}
|
||||
|
||||
@ -338,7 +338,7 @@ impl Backfiller {
|
||||
|
||||
let path = format!("{}/{f}/{s}/{number}.rmp.lz4", self.root.to_string_lossy());
|
||||
if Path::new(&path).exists() {
|
||||
trace!(block = number, "hlfs: already have");
|
||||
debug!(block = number, "hlfs: already have");
|
||||
return Ok(None);
|
||||
}
|
||||
match self.client.wants_block(number, rr_index).await {
|
||||
@ -356,6 +356,7 @@ impl Backfiller {
|
||||
warn!(%path, "hlfs: write failed: {e}");
|
||||
return Ok(None);
|
||||
}
|
||||
debug!(block = number, "hlfs: got block");
|
||||
Ok(Some(data.len()))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user