Use pico inflation for ledger-tool capitalization --enable-inflation (#13215)
* Use pico inflation for ledger-tool capitalization --enable-inflation * rust fmt
This commit is contained in:
parent
4e0d1b1d4a
commit
7d2962135d
@ -2002,7 +2002,7 @@ fn main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if arg_matches.is_present("enable_inflation") {
|
if arg_matches.is_present("enable_inflation") {
|
||||||
let inflation = Inflation::default();
|
let inflation = Inflation::pico();
|
||||||
println!(
|
println!(
|
||||||
"Forcing to: {:?} (was: {:?})",
|
"Forcing to: {:?} (was: {:?})",
|
||||||
inflation,
|
inflation,
|
||||||
|
@ -3919,7 +3919,7 @@ impl Bank {
|
|||||||
let new_feature_activations = self.compute_active_feature_set(!init_finish_or_warp);
|
let new_feature_activations = self.compute_active_feature_set(!init_finish_or_warp);
|
||||||
|
|
||||||
if new_feature_activations.contains(&feature_set::pico_inflation::id()) {
|
if new_feature_activations.contains(&feature_set::pico_inflation::id()) {
|
||||||
*self.inflation.write().unwrap() = Inflation::new_fixed(0.0001); // 0.01% inflation
|
*self.inflation.write().unwrap() = Inflation::pico();
|
||||||
self.fee_rate_governor.burn_percent = 50; // 50% fee burn
|
self.fee_rate_governor.burn_percent = 50; // 50% fee burn
|
||||||
self.rent_collector.rent.burn_percent = 50; // 50% rent burn
|
self.rent_collector.rent.burn_percent = 50; // 50% rent burn
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,10 @@ impl Inflation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn pico() -> Self {
|
||||||
|
Self::new_fixed(0.0001) // 0.01% inflation
|
||||||
|
}
|
||||||
|
|
||||||
/// inflation rate at year
|
/// inflation rate at year
|
||||||
pub fn total(&self, year: f64) -> f64 {
|
pub fn total(&self, year: f64) -> f64 {
|
||||||
assert!(year >= 0.0);
|
assert!(year >= 0.0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user