fixed notes
This commit is contained in:
parent
d2cd6f69cb
commit
f1edf627ae
@ -778,5 +778,4 @@ mod tests {
|
||||
assert_eq!(bc.best_block_hash(), b1_hash);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user