Remove old feature: simple_capitalization (#15763)

* Remove old feature: simple_capitalization

* Fix another failing test in core

* Finish up test cleanup

* Further clean up a bit
This commit is contained in:
Ryo Onodera
2021-03-12 11:12:40 +09:00
committed by GitHub
parent 209dbb6f7c
commit 4bbeb9c033
11 changed files with 115 additions and 502 deletions

View File

@ -1238,13 +1238,6 @@ fn main() {
.help("Enable stake program v2 (several inflation-related staking \
bugs are feature-gated behind this)"),
)
.arg(
Arg::with_name("enable_simple_capitalization")
.required(false)
.long("enable-simple-capitalization")
.takes_value(false)
.help("Enable simple capitalization to test hardcoded cap adjustments"),
)
.arg(
Arg::with_name("recalculate_capitalization")
.required(false)
@ -2194,30 +2187,6 @@ fn main() {
genesis_config.rent.minimum_balance(Feature::size_of()),
1,
);
if arg_matches.is_present("enable_simple_capitalization") {
if base_bank
.get_account(&feature_set::simple_capitalization::id())
.is_none()
{
base_bank.store_account(
&feature_set::simple_capitalization::id(),
&feature::create_account(
&Feature { activated_at: None },
feature_account_balance,
),
);
let old_cap = base_bank.set_capitalization();
let new_cap = base_bank.capitalization();
warn!(
"Skewing capitalization a bit to enable simple capitalization as \
requested: increasing {} from {} to {}",
feature_account_balance, old_cap, new_cap,
);
assert_eq!(old_cap + feature_account_balance, new_cap);
} else {
warn!("Already simple_capitalization is activated (or scheduled)");
}
}
if arg_matches.is_present("enable_stake_program_v2") {
let mut force_enabled_count = 0;
if base_bank