()
| 167 | |
| 168 | #[test] |
| 169 | fn not_cacheable_without_canonical() { |
| 170 | let mut cache = FlashblockCache { entries: HashMap::new(), latest_canonical: None }; |
| 171 | assert!(!cache.is_cacheable(1)); |
| 172 | assert!(!cache.insert(make_flashblock(1, 0))); |
| 173 | } |
| 174 | |
| 175 | #[test] |
| 176 | fn duplicate_index_keeps_latest() { |