Skip to content

Commit 34bdc4d

Browse files
committed
updated a few comments
1 parent 7ddb183 commit 34bdc4d

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
@@ -1429,7 +1429,7 @@ contract FilecoinWarmStorageService is
14291429
require(dataSetId != 0, Errors.RailNotAssociated(railId));
14301430

14311431
// Calculate the total number of epochs in the requested range
1432-
uint256 totalEpochsRequested = toEpoch - fromEpoch; // total epochs = (toEpoch) - (fromEpoch + 1) - 1 == toEpoch - fromEpoch
1432+
uint256 totalEpochsRequested = toEpoch - fromEpoch;
14331433
require(totalEpochsRequested > 0, Errors.InvalidEpochRange(fromEpoch, toEpoch));
14341434

14351435
// If proving wasn't ever activated for this data set, don't pay anything
@@ -1518,7 +1518,7 @@ contract FilecoinWarmStorageService is
15181518

15191519
// now handle the last period separately
15201520
if (_isPeriodProven(dataSetId, endingPeriod, currentPeriod)) {
1521-
// 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`)
1521+
// 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
15221522
provenEpochCount += (toEpoch - _calcPeriodDeadline(dataSetId, endingPeriod - 1));
15231523
lastProvenEpoch = toEpoch;
15241524
}

0 commit comments

Comments
 (0)