fixed notes

This commit is contained in:
Nikolay Volf 2016-01-27 19:01:33 +04:00
parent d2cd6f69cb
commit f1edf627ae
3 changed files with 0 additions and 23 deletions

View File

@ -778,5 +778,4 @@ mod tests {
assert_eq!(bc.best_block_hash(), b1_hash);
}
}
}

View File

@ -293,17 +293,6 @@ impl Client {
self.chain.read().unwrap().collect_garbage(false);
}
/// Minimizes cache used by the client.
pub fn minimize_cache(&self) {
self.chain.read().unwrap().squeeze_to_fit(
CacheSize {
blocks: 0,
block_logs: 0,
transaction_addresses: 0,
block_details: 0,
blocks_blooms: 0
});
}
}
impl BlockChainClient for Client {

View File

@ -109,17 +109,6 @@ fn imports_block_sequence() {
assert!(!block.is_empty());
}
#[test]
fn can_have_cash_minimized() {
let client = generate_dummy_client(20);
client.minimize_cache();
assert!(client.cache_info().blocks < 2048);
assert!(client.cache_info().block_details < 4096);
assert_eq!(client.cache_info().block_logs, 0);
assert_eq!(client.cache_info().blocks_blooms, 0);
}
#[test]
fn can_collect_garbage() {
let client = generate_dummy_client(100);