Skip to content

Commit

Permalink
read pivots from DB until whole sync not finished (including receipts)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcindsobczak committed May 8, 2023
1 parent 11d20b0 commit eccecab
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -344,22 +344,22 @@ private bool ShouldBeInBeaconHeaders()

private bool ShouldBeInUpdatingPivot()
{
bool fastReceiptsNotFinished = !FastBlocksReceiptsFinished;
bool updateRequestedAndNotFinished = _syncConfig.MaxAttemptsToUpdatePivot > 0;
bool isPostMerge = _beaconSyncStrategy.GetFinalizedHash() != null;
bool stateSyncNotFinished = _syncProgressResolver.FindBestFullState() == 0;

bool result = updateRequestedAndNotFinished &&
bool result = fastReceiptsNotFinished &&
updateRequestedAndNotFinished &&
FastSyncEnabled &&
isPostMerge &&
stateSyncNotFinished;
isPostMerge;

if (_logger.IsTrace)
{
LogDetailedSyncModeChecks("UPDATING PIVOT",
(nameof(fastReceiptsNotFinished), fastReceiptsNotFinished),
(nameof(updateRequestedAndNotFinished), updateRequestedAndNotFinished),
(nameof(FastSyncEnabled), FastSyncEnabled),
(nameof(isPostMerge), isPostMerge),
(nameof(stateSyncNotFinished), stateSyncNotFinished));
(nameof(isPostMerge), isPostMerge));
}

return result;
Expand Down

0 comments on commit eccecab

Please sign in to comment.