MCPcopy Create free account
hub / github.com/base/base / rejects_beyond_cache_limit

Function rejects_beyond_cache_limit

crates/execution/flashblocks/src/cache.rs:141–149  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

139
140 #[test]
141 fn rejects_beyond_cache_limit() {
142 let mut cache = FlashblockCache::new(10);
143
144 // Block 16 is the last cacheable block (10 + 5 + 1)
145 assert!(cache.insert(make_flashblock(16, 0)));
146 // Block 17 exceeds the limit
147 assert!(!cache.insert(make_flashblock(17, 0)));
148 assert_eq!(cache.len(), 1);
149 }
150
151 #[test]
152 fn update_canonical_evicts_old_entries() {

Callers

nothing calls this directly

Calls 1

newFunction · 0.50

Tested by

no test coverage detected