Creates a new cache initialized with the given canonical block number.
(latest_canonical: BlockNumber)
| 28 | impl FlashblockCache { |
| 29 | /// Creates a new cache initialized with the given canonical block number. |
| 30 | pub fn new(latest_canonical: BlockNumber) -> Self { |
| 31 | Self { entries: HashMap::new(), latest_canonical: Some(latest_canonical) } |
| 32 | } |
| 33 | |
| 34 | /// Returns `true` when the flashblock is cached. |
| 35 | pub fn has_flashblock(&self, block_number: BlockNumber, index: u64) -> bool { |