lighthouse/common/lru_cache/src/lib.rs
Age Manning 3bb30754d9 Keep track of failed head chains and prevent re-lookups (#1534)
## Overview

There are forked chains which get referenced by blocks and attestations on a network. Typically if these chains are very long, we stop looking up the chain and downvote the peer. In extreme circumstances, many peers are on many chains, the chains can be very deep and become time consuming performing lookups. 

This PR adds a cache to known failed chain lookups. This prevents us from starting a parent-lookup (or stopping one half way through) if we have attempted the chain lookup in the past.
2020-08-18 03:54:09 +00:00

8 lines
150 B
Rust

//! A library to provide fast and efficient LRU Cache's without updating.
mod space;
mod time;
pub use space::LRUCache;
pub use time::LRUTimeCache;