Skip to content
This repository has been archived by the owner on Aug 23, 2020. It is now read-only.

Commit

Permalink
clarifies when quick solidification happens
Browse files Browse the repository at this point in the history
  • Loading branch information
luca-moser committed Sep 23, 2019
1 parent 75aca24 commit e58b428
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,16 @@ public void start() {

@Override
public void solidify() {
// we only try to quick solidify transactions when we are not synchronized and below the depth of the
// quick solidification parameter
int latestMilestoneIndex = latestMilestoneTracker.getLatestMilestoneIndex();
int depth = solidificationConfig.getSolidifierDepth();
if (latestMilestoneIndex - depth <= 0
|| snapshotProvider.getLatestSnapshot().getIndex() < latestMilestoneIndex - depth) {

// don't solidify if not enough milestones were issued yet
if (latestMilestoneIndex - depth <= 0) {
return;
}

// we only try to quick solidify transactions when we are above the defined solidification depth
if (snapshotProvider.getLatestSnapshot().getIndex() < latestMilestoneIndex - depth) {
return;
}

Expand Down

0 comments on commit e58b428

Please sign in to comment.