Improve Rpc inflation tooling (bp #10309) (#10322)

automerge
This commit is contained in:
mergify[bot]
2020-05-29 14:09:41 -07:00
committed by GitHub
parent 37c182cd5d
commit 163217815b
11 changed files with 217 additions and 58 deletions

View File

@ -18,7 +18,7 @@ pub struct Inflation {
/// Duration of foundation pool inflation, in years
pub foundation_term: f64,
/// Percentage of total inflation allocated to storage rewards
/// DEPRECATED, this field is currently unused
pub storage: f64,
}
@ -27,7 +27,7 @@ const DEFAULT_TERMINAL: f64 = 0.015;
const DEFAULT_TAPER: f64 = 0.15;
const DEFAULT_FOUNDATION: f64 = 0.05;
const DEFAULT_FOUNDATION_TERM: f64 = 7.0;
const DEFAULT_STORAGE: f64 = 0.10;
const DEFAULT_STORAGE: f64 = 0.0;
impl Default for Inflation {
fn default() -> Self {
@ -69,8 +69,8 @@ impl Inflation {
self.total(year) - self.storage(year) - self.foundation(year)
}
/// portion of total that goes to storage mining
pub fn storage(&self, year: f64) -> f64 {
/// DEPRECATED
fn storage(&self, year: f64) -> f64 {
self.total(year) * self.storage
}