From 973fa9f3266365069b900fd9501f7a6eedd48ce8 Mon Sep 17 00:00:00 2001 From: terence tsao Date: Fri, 1 May 2020 17:36:54 -0700 Subject: [PATCH] Regen historical state: don't skip saving historical state (#5712) * Save every state at archived point * Merge branch 'master' into save-every-state --- beacon-chain/db/kv/regen_historical_states.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon-chain/db/kv/regen_historical_states.go b/beacon-chain/db/kv/regen_historical_states.go index 20f046b28f57..142b454c3815 100644 --- a/beacon-chain/db/kv/regen_historical_states.go +++ b/beacon-chain/db/kv/regen_historical_states.go @@ -122,7 +122,7 @@ func (kv *Store) regenHistoricalStates(ctx context.Context) error { if len(blocks) > 0 { // Save the historical root, state and highest index to the DB. - if helpers.IsEpochStart(currentState.Slot()) && currentState.Slot()%slotsPerArchivedPoint == 0 && blocks[len(blocks)-1].Block.Slot&slotsPerArchivedPoint == 0 { + if helpers.IsEpochStart(currentState.Slot()) && currentState.Slot()%slotsPerArchivedPoint == 0 { if err := kv.saveArchivedInfo(ctx, currentState.Copy(), blocks, i); err != nil { return err }