Skip to content

Commit

Permalink
Update initial sync save justified to align with v0.9.3 (#4432)
Browse files Browse the repository at this point in the history
  • Loading branch information
terencechain authored and prestonvanloon committed Jan 6, 2020
1 parent 0479a4a commit 02101dd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions beacon-chain/blockchain/forkchoice/process_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,9 @@ func (s *Store) OnBlockInitialSyncStateTransition(ctx context.Context, signed *e
}

// Update justified check point.
if postState.CurrentJustifiedCheckpoint.Epoch > s.JustifiedCheckpt().Epoch {
s.justifiedCheckpt = postState.CurrentJustifiedCheckpoint
if err := s.db.SaveJustifiedCheckpoint(ctx, postState.CurrentJustifiedCheckpoint); err != nil {
return errors.Wrap(err, "could not save justified checkpoint")
if postState.CurrentJustifiedCheckpoint.Epoch > s.justifiedCheckpt.Epoch {
if err := s.updateJustified(ctx, postState); err != nil {
return err
}
}

Expand Down

0 comments on commit 02101dd

Please sign in to comment.