mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 02:42:38 +00:00
Merge remote-tracking branch 'origin/stable' into release-v7.1.0
This commit is contained in:
@@ -822,7 +822,7 @@ pub fn cli_app() -> Command {
|
||||
.long("state-cache-size")
|
||||
.value_name("STATE_CACHE_SIZE")
|
||||
.help("Specifies the size of the state cache")
|
||||
.default_value("32")
|
||||
.default_value("128")
|
||||
.action(ArgAction::Set)
|
||||
.display_order(0)
|
||||
)
|
||||
|
||||
@@ -345,7 +345,9 @@ impl<E: EthSpec> StateCache<E> {
|
||||
let mut old_boundary_state_roots = vec![];
|
||||
let mut good_boundary_state_roots = vec![];
|
||||
|
||||
for (&state_root, (_, state)) in self.states.iter().skip(cull_exempt) {
|
||||
// Skip the `cull_exempt` most-recently used, then reverse the iterator to start at
|
||||
// least-recently used states.
|
||||
for (&state_root, (_, state)) in self.states.iter().skip(cull_exempt).rev() {
|
||||
let is_advanced = state.slot() > state.latest_block_header().slot;
|
||||
let is_boundary = state.slot() % E::slots_per_epoch() == 0;
|
||||
let could_finalize =
|
||||
|
||||
Reference in New Issue
Block a user