Add shrink paths (#14238)
This commit is contained in:
@ -33,6 +33,7 @@ pub fn load(
|
||||
genesis_config: &GenesisConfig,
|
||||
blockstore: &Blockstore,
|
||||
account_paths: Vec<PathBuf>,
|
||||
shrink_paths: Option<Vec<PathBuf>>,
|
||||
snapshot_config: Option<&SnapshotConfig>,
|
||||
process_options: ProcessOptions,
|
||||
transaction_status_sender: Option<TransactionStatusSender>,
|
||||
@ -69,6 +70,9 @@ pub fn load(
|
||||
Some(&crate::builtins::get(process_options.bpf_jit)),
|
||||
)
|
||||
.expect("Load from snapshot failed");
|
||||
if let Some(shrink_paths) = shrink_paths {
|
||||
deserialized_bank.set_shrink_paths(shrink_paths);
|
||||
}
|
||||
|
||||
let deserialized_snapshot_hash = (
|
||||
deserialized_bank.slot(),
|
||||
|
@ -925,7 +925,7 @@ fn load_frozen_forks(
|
||||
leader_schedule_cache.set_root(&new_root_bank);
|
||||
new_root_bank.squash();
|
||||
|
||||
if last_free.elapsed() > Duration::from_secs(30) {
|
||||
if last_free.elapsed() > Duration::from_secs(10) {
|
||||
// This could take few secs; so update last_free later
|
||||
new_root_bank.exhaustively_free_unused_resource();
|
||||
last_free = Instant::now();
|
||||
|
Reference in New Issue
Block a user