mirror of
https://github.com/sigp/lighthouse.git
synced 2026-07-04 13:24:39 +00:00
Quick fix for state reconstruction
This commit is contained in:
@@ -20,6 +20,10 @@ pub fn process_inactivity_updates<T: EthSpec>(
|
|||||||
|
|
||||||
// Fast path: inactivity scores have already been pre-computed.
|
// Fast path: inactivity scores have already been pre-computed.
|
||||||
if let Some(inactivity_score_updates) = participation_cache.inactivity_score_updates.take() {
|
if let Some(inactivity_score_updates) = participation_cache.inactivity_score_updates.take() {
|
||||||
|
// We need to flush the existing inactivity scores in case tree hashing hasn't happened in
|
||||||
|
// a long time (e.g. during state reconstruction).
|
||||||
|
// FIXME(sproul): re-think this
|
||||||
|
state.inactivity_scores_mut()?.apply_updates()?;
|
||||||
state
|
state
|
||||||
.inactivity_scores_mut()?
|
.inactivity_scores_mut()?
|
||||||
.bulk_update(inactivity_score_updates)?;
|
.bulk_update(inactivity_score_updates)?;
|
||||||
|
|||||||
Reference in New Issue
Block a user