diff --git a/src/blockchain.rs b/src/blockchain.rs index 2610407ac..757e51c59 100644 --- a/src/blockchain.rs +++ b/src/blockchain.rs @@ -785,8 +785,9 @@ mod tests { } assert!(bc.cache_size().blocks > 1024 * 1024); - bc.collect_garbage(true); - + for _ in 0..2 { + bc.collect_garbage(true); + } assert!(bc.cache_size().blocks < 1024 * 1024); }