add enable_rehashing to AccountsPackage (#27644)
This commit is contained in:
parent
54284955de
commit
1f00b468e5
|
@ -133,8 +133,6 @@ impl AccountsHashVerifier {
|
||||||
};
|
};
|
||||||
timings.calc_storage_size_quartiles(&accounts_package.snapshot_storages);
|
timings.calc_storage_size_quartiles(&accounts_package.snapshot_storages);
|
||||||
|
|
||||||
let enable_rehashing = true;
|
|
||||||
|
|
||||||
let (accounts_hash, lamports) = accounts_package
|
let (accounts_hash, lamports) = accounts_package
|
||||||
.accounts
|
.accounts
|
||||||
.accounts_db
|
.accounts_db
|
||||||
|
@ -148,7 +146,7 @@ impl AccountsHashVerifier {
|
||||||
rent_collector: &accounts_package.rent_collector,
|
rent_collector: &accounts_package.rent_collector,
|
||||||
store_detailed_debug_info_on_failure: false,
|
store_detailed_debug_info_on_failure: false,
|
||||||
full_snapshot: None,
|
full_snapshot: None,
|
||||||
enable_rehashing,
|
enable_rehashing: accounts_package.enable_rehashing,
|
||||||
},
|
},
|
||||||
&sorted_storages,
|
&sorted_storages,
|
||||||
timings,
|
timings,
|
||||||
|
@ -172,7 +170,7 @@ impl AccountsHashVerifier {
|
||||||
rent_collector: &accounts_package.rent_collector,
|
rent_collector: &accounts_package.rent_collector,
|
||||||
store_detailed_debug_info_on_failure: false,
|
store_detailed_debug_info_on_failure: false,
|
||||||
full_snapshot: None,
|
full_snapshot: None,
|
||||||
enable_rehashing,
|
enable_rehashing: accounts_package.enable_rehashing,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
info!(
|
info!(
|
||||||
|
@ -193,7 +191,7 @@ impl AccountsHashVerifier {
|
||||||
// now that we've failed, store off the failing contents that produced a bad capitalization
|
// now that we've failed, store off the failing contents that produced a bad capitalization
|
||||||
store_detailed_debug_info_on_failure: true,
|
store_detailed_debug_info_on_failure: true,
|
||||||
full_snapshot: None,
|
full_snapshot: None,
|
||||||
enable_rehashing,
|
enable_rehashing: accounts_package.enable_rehashing,
|
||||||
},
|
},
|
||||||
&sorted_storages,
|
&sorted_storages,
|
||||||
HashStats::default(),
|
HashStats::default(),
|
||||||
|
@ -481,6 +479,7 @@ mod tests {
|
||||||
accounts: Arc::clone(&accounts),
|
accounts: Arc::clone(&accounts),
|
||||||
epoch_schedule: EpochSchedule::default(),
|
epoch_schedule: EpochSchedule::default(),
|
||||||
rent_collector: RentCollector::default(),
|
rent_collector: RentCollector::default(),
|
||||||
|
enable_rehashing: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
AccountsHashVerifier::process_accounts_package(
|
AccountsHashVerifier::process_accounts_package(
|
||||||
|
|
|
@ -48,6 +48,7 @@ pub struct AccountsPackage {
|
||||||
pub accounts: Arc<Accounts>,
|
pub accounts: Arc<Accounts>,
|
||||||
pub epoch_schedule: EpochSchedule,
|
pub epoch_schedule: EpochSchedule,
|
||||||
pub rent_collector: RentCollector,
|
pub rent_collector: RentCollector,
|
||||||
|
pub enable_rehashing: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl AccountsPackage {
|
impl AccountsPackage {
|
||||||
|
@ -118,6 +119,7 @@ impl AccountsPackage {
|
||||||
accounts: bank.accounts(),
|
accounts: bank.accounts(),
|
||||||
epoch_schedule: *bank.epoch_schedule(),
|
epoch_schedule: *bank.epoch_schedule(),
|
||||||
rent_collector: bank.rent_collector().clone(),
|
rent_collector: bank.rent_collector().clone(),
|
||||||
|
enable_rehashing: true, // this will be feature driven using bank
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4189,6 +4189,7 @@ mod tests {
|
||||||
accounts: Arc::new(crate::accounts::Accounts::default_for_tests()),
|
accounts: Arc::new(crate::accounts::Accounts::default_for_tests()),
|
||||||
epoch_schedule: solana_sdk::epoch_schedule::EpochSchedule::default(),
|
epoch_schedule: solana_sdk::epoch_schedule::EpochSchedule::default(),
|
||||||
rent_collector: crate::rent_collector::RentCollector::default(),
|
rent_collector: crate::rent_collector::RentCollector::default(),
|
||||||
|
enable_rehashing: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue