HelixNetwork / pendulum

Pendulum is a distributed messaging protocol that enables globally available tamper proof timestamps :hourglass_flowing_sand:
https://dev.hlx.ai
Other
10 stars 6 forks source link

Fix MilestoneCandidate processing #201

Closed oracle58 closed 4 years ago

oracle58 commented 4 years ago

this fixes the issue that milestoneCandidates were skipped for validation, as falsely declared as too old.

// if the milestone is older than our ledger start point: we already processed it in the past
if (roundIndex <= snapshotProvider.getInitialSnapshot().getIndex()) {
    return true;
}

MILESTONE_START_INDEX is the initial snap index (snapshotProvider.getInitialSnapshot().getIndex()).