Skip to content

Commit 17eee48

Browse files
committed
updated a few comments
1 parent 7095dc7 commit 17eee48

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

service_contracts/src/FilecoinWarmStorageService.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,7 +1446,7 @@ contract FilecoinWarmStorageService is
14461446
require(dataSetId != 0, Errors.RailNotAssociated(railId));
14471447

14481448
// Calculate the total number of epochs in the requested range
1449-
uint256 totalEpochsRequested = toEpoch - fromEpoch; // total epochs = (toEpoch) - (fromEpoch + 1) - 1 == toEpoch - fromEpoch
1449+
uint256 totalEpochsRequested = toEpoch - fromEpoch;
14501450
require(totalEpochsRequested > 0, Errors.InvalidEpochRange(fromEpoch, toEpoch));
14511451

14521452
// If proving wasn't ever activated for this data set, don't pay anything
@@ -1535,7 +1535,7 @@ contract FilecoinWarmStorageService is
15351535

15361536
// now handle the last period separately
15371537
if (_isPeriodProven(dataSetId, endingPeriod, currentPeriod)) {
1538-
// then the epochs to add = `endingPeriodStarting` to `toEpoch`. But since `endingPeriodStarting` is simply the ending of its previous period + 1, so epochs: (`deadline + 1` -> `to`)
1538+
// epochs to add: start from `start of current period` , go upto `toEpoch`. Note that `start of current period` is same as `deadline of previous period` + 1
15391539
provenEpochCount += (toEpoch - _calcPeriodDeadline(dataSetId, endingPeriod - 1));
15401540
lastProvenEpoch = toEpoch;
15411541
}

0 commit comments

Comments
 (0)