Skip to content

Commit

Permalink
Regen historical state: don't skip saving historical state (#5712)
Browse files Browse the repository at this point in the history
* Save every state at archived point
* Merge branch 'master' into save-every-state
  • Loading branch information
terencechain authored May 2, 2020
1 parent 37f2a04 commit 973fa9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion beacon-chain/db/kv/regen_historical_states.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 973fa9f

Please sign in to comment.