summaryrefslogtreecommitdiff
path: root/ledger/catchpointtracker.go
diff options
context:
space:
mode:
Diffstat (limited to 'ledger/catchpointtracker.go')
-rw-r--r--ledger/catchpointtracker.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/ledger/catchpointtracker.go b/ledger/catchpointtracker.go
index 58d6e77b7..087580f42 100644
--- a/ledger/catchpointtracker.go
+++ b/ledger/catchpointtracker.go
@@ -272,7 +272,11 @@ func (ct *catchpointTracker) produceCommittingTask(committedRound basics.Round,
return nil
}
- dcr.offset = uint64(newBase - dcr.oldBase)
+ newOffset := uint64(newBase - dcr.oldBase)
+ // trackers are not allowed to increase offsets, only descease
+ if newOffset < dcr.offset {
+ dcr.offset = newOffset
+ }
// check to see if this is a catchpoint round
dcr.isCatchpointRound = ct.isCatchpointRound(dcr.offset, dcr.oldBase, dcr.lookback)