chore(stages): log hash insertion progress as Display string (#7535)

This commit is contained in:
Alexey Shekhirin
2024-04-10 12:04:30 +01:00
committed by GitHub
parent 283b56c1b9
commit cf97b23375
3 changed files with 3 additions and 3 deletions

View File

@ -206,7 +206,7 @@ impl<DB: Database> Stage<DB> for AccountHashingStage {
if index > 0 && index % interval == 0 { if index > 0 && index % interval == 0 {
info!( info!(
target: "sync::stages::hashing_account", target: "sync::stages::hashing_account",
progress = format!("{:.2}%", (index as f64 / total_hashes as f64) * 100.0), progress = %format!("{:.2}%", (index as f64 / total_hashes as f64) * 100.0),
"Inserting hashes" "Inserting hashes"
); );
} }

View File

@ -123,7 +123,7 @@ impl<DB: Database> Stage<DB> for StorageHashingStage {
if index > 0 && index % interval == 0 { if index > 0 && index % interval == 0 {
info!( info!(
target: "sync::stages::hashing_storage", target: "sync::stages::hashing_storage",
progress = format!("{:.2}%", (index as f64 / total_hashes as f64) * 100.0), progress = %format!("{:.2}%", (index as f64 / total_hashes as f64) * 100.0),
"Inserting hashes" "Inserting hashes"
); );
} }

View File

@ -142,7 +142,7 @@ impl<DB: Database> Stage<DB> for TransactionLookupStage {
info!( info!(
target: "sync::stages::transaction_lookup", target: "sync::stages::transaction_lookup",
?append_only, ?append_only,
progress = format!("{:.2}%", (index as f64 / total_hashes as f64) * 100.0), progress = %format!("{:.2}%", (index as f64 / total_hashes as f64) * 100.0),
"Inserting hashes" "Inserting hashes"
); );
} }