mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-23 11:57:18 +00:00
Save Archived State (#6503)
This commit is contained in:
parent
46b82eb15d
commit
b868dfa481
@ -62,7 +62,7 @@ func (s *State) Resume(ctx context.Context) (*state.BeaconState, error) {
|
||||
return s.beaconDB.GenesisState(ctx)
|
||||
}
|
||||
|
||||
s.finalizedInfo = &finalizedInfo{slot: lastArchivedState.Slot(), root: lastArchivedRoot}
|
||||
s.finalizedInfo = &finalizedInfo{slot: lastArchivedState.Slot(), root: lastArchivedRoot, state: lastArchivedState.Copy()}
|
||||
|
||||
return lastArchivedState, nil
|
||||
}
|
||||
|
@ -45,4 +45,7 @@ func TestResume(t *testing.T) {
|
||||
if root != service.finalizedInfo.root {
|
||||
t.Errorf("Did not get wanted root")
|
||||
}
|
||||
if service.finalizedState() == nil {
|
||||
t.Error("Wanted a non nil finalized state")
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user