Dump rent_collector/inflation with ledger-tool cap (#17069)

This commit is contained in:
Ryo Onodera 2021-05-06 19:29:46 +09:00 committed by GitHub
parent 2541809c45
commit d19526e6c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -2640,6 +2640,8 @@ fn main() {
}
assert_capitalization(&bank);
println!("Inflation: {:?}", bank.inflation());
println!("RentCollector: {:?}", bank.rent_collector());
println!("Capitalization: {}", Sol(bank.capitalization()));
}
}

View File

@ -4544,6 +4544,10 @@ impl Bank {
*self.inflation.read().unwrap()
}
pub fn rent_collector(&self) -> RentCollector {
self.rent_collector.clone()
}
/// Return the total capitalization of the Bank
pub fn capitalization(&self) -> u64 {
self.capitalization.load(Relaxed)