--halt-at-slot-store-hash-raw-data works for root bank (#26865)
This commit is contained in:
parent
d159682a6d
commit
f6e4f76dac
|
@ -1533,6 +1533,21 @@ fn load_frozen_forks(
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
if slot >= halt_at_slot {
|
if slot >= halt_at_slot {
|
||||||
|
run_final_hash_calc(&bank, on_halt_store_hash_raw_data_for_debug);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if on_halt_store_hash_raw_data_for_debug {
|
||||||
|
run_final_hash_calc(
|
||||||
|
&bank_forks.read().unwrap().root_bank(),
|
||||||
|
on_halt_store_hash_raw_data_for_debug,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn run_final_hash_calc(bank: &Bank, on_halt_store_hash_raw_data_for_debug: bool) {
|
||||||
bank.force_flush_accounts_cache();
|
bank.force_flush_accounts_cache();
|
||||||
let can_cached_slot_be_unflushed = true;
|
let can_cached_slot_be_unflushed = true;
|
||||||
// note that this slot may not be a root
|
// note that this slot may not be a root
|
||||||
|
@ -1544,12 +1559,6 @@ fn load_frozen_forks(
|
||||||
run_in_background: false,
|
run_in_background: false,
|
||||||
store_hash_raw_data_for_debug: on_halt_store_hash_raw_data_for_debug,
|
store_hash_raw_data_for_debug: on_halt_store_hash_raw_data_for_debug,
|
||||||
});
|
});
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// `roots` is sorted largest to smallest by root slot
|
// `roots` is sorted largest to smallest by root slot
|
||||||
|
|
Loading…
Reference in New Issue