mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-26 05:17:22 +00:00
Regen historical state: don't skip saving historical state (#5712)
* Save every state at archived point * Merge branch 'master' into save-every-state
This commit is contained in:
parent
37f2a04e51
commit
973fa9f326
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user