Returns `true` when the flashblock's block number is within [`MAX_CACHE_AHEAD_BLOCKS`] of the latest known canonical block and is therefore eligible for caching.
(&self, block_number: BlockNumber)
| 40 | /// [`MAX_CACHE_AHEAD_BLOCKS`] of the latest known canonical block and is |
| 41 | /// therefore eligible for caching. |
| 42 | pub const fn is_cacheable(&self, block_number: BlockNumber) -> bool { |
| 43 | match self.latest_canonical { |
| 44 | Some(canonical) => block_number <= canonical + MAX_CACHE_AHEAD_BLOCKS + 1, |
| 45 | None => false, |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | /// Inserts a flashblock into the cache. |
| 50 | /// |