Avoid overflow when computing rent distribution (#12112)
* Avoid overflow when computing rent distribution * Use assert_eq!.... * Fix tests * Add test * Use FeatureSet * Add comments * Address review comments * Tweak a bit. * Fix fmt
This commit is contained in:
@@ -607,6 +607,7 @@ pub fn bank_from_archive<P: AsRef<Path>>(
|
||||
panic!("Snapshot bank for slot {} failed to verify", bank.slot());
|
||||
}
|
||||
if genesis_config.cluster_type == ClusterType::Testnet {
|
||||
// remove me after we transitions to the fixed rent distribution with no overflow
|
||||
let old = bank.set_capitalization();
|
||||
if old != bank.capitalization() {
|
||||
warn!(
|
||||
|
Reference in New Issue
Block a user