We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 495162f commit 77d7234Copy full SHA for 77d7234
src/blockdir.rs
@@ -96,6 +96,10 @@ impl BlockDir {
96
97
/// Remember the existence of this many blocks, even if we don't have their content.
98
const EXISTENCE_CACHE_SIZE: usize = (64 << 20) / BLAKE_HASH_SIZE_BYTES;
99
+ const {
100
+ // Protect against excessive memory usage introduced by mutants.
101
+ assert!(EXISTENCE_CACHE_SIZE < 1_000_000_000, "Cache size too large");
102
+ }
103
104
BlockDir {
105
transport,
0 commit comments