Skip to content

Commit e6e0386

Browse files
committed
add more log to indicate progress
1 parent 1c48136 commit e6e0386

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

crates/client/src/state_dump.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -271,15 +271,16 @@ pub fn export_space_accounts_with_callback<F: Fn(AccountState)>(
271271
StorageKeyWithSpace::from_key_bytes::<SkipInputCheck>(&key);
272272
if storage_key_with_space.space != space {
273273
core_space_key_count += 1;
274-
if core_space_key_count % 10000 == 0 {
275-
println(&format!(
276-
"total_key_count: {}, core_space_key_count: {}",
277-
total_key_count, core_space_key_count
278-
));
279-
}
280274
return;
281275
}
282276

277+
if total_key_count % 10000 == 0 {
278+
println(&format!(
279+
"total_key_count: {}, core_space_key_count: {}",
280+
total_key_count, core_space_key_count
281+
));
282+
}
283+
283284
if let StorageKey::AccountKey(address_bytes) =
284285
storage_key_with_space.key
285286
{

crates/dbs/storage/src/impls/single_mpt_state.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,16 @@ impl SingleMptState {
312312
) -> Result<()> {
313313
self.ensure_temp_slab_for_db_load();
314314

315+
let mut total_key_count = 0;
316+
315317
let mut inner_callback = |(k, v): MptKeyValue| {
318+
total_key_count += 1;
319+
if total_key_count % 10000 == 0 {
320+
println!(
321+
"read_all_with_callback_impl -> total_key_count: {} {:?}",
322+
total_key_count, k
323+
);
324+
}
316325
if v.len() > 0 {
317326
callback((k, v));
318327
}

0 commit comments

Comments
 (0)