chain_mem_used function on client

This commit is contained in:
Robert Habermeier 2016-12-23 14:54:31 +01:00
parent bdf90df56f
commit 0688ccb003
1 changed files with 7 additions and 0 deletions

View File

@ -186,6 +186,13 @@ impl Client {
pub fn report(&self) -> ClientReport {
::std::mem::replace(&mut *self.report.write(), ClientReport::default())
}
/// Get blockchain mem usage in bytes.
pub fn chain_mem_used(&self) -> usize {
use util::HeapSizeOf;
self.chain.heap_size_of_children()
}
}
impl LightChainClient for Client {