Add new inflation feature-ids (#13671)
* Add new inflation feature-ids, and full_inflation default values * Compute inflation start from full_inflation activation * Include pico_inflation in inflation start computation * Add full-inflation constructor * Align inflation taper with rewards accrual start and catch overflow edge case
This commit is contained in:
@@ -69,6 +69,17 @@ impl Inflation {
|
||||
Self::new_fixed(0.0001) // 0.01% inflation
|
||||
}
|
||||
|
||||
pub fn full() -> Self {
|
||||
Self {
|
||||
initial: DEFAULT_INITIAL,
|
||||
terminal: DEFAULT_TERMINAL,
|
||||
taper: DEFAULT_TAPER,
|
||||
foundation: 0.0,
|
||||
foundation_term: 0.0,
|
||||
__unused: 0.0,
|
||||
}
|
||||
}
|
||||
|
||||
/// inflation rate at year
|
||||
pub fn total(&self, year: f64) -> f64 {
|
||||
assert!(year >= 0.0);
|
||||
|
Reference in New Issue
Block a user