SocializingPool.sol::getRewardCycleDetails
function getRewardCycleDetails(uint256 _index) public view returns (uint256 _startBlock, uint256 _endBlock)
The above read method returns startBlock, endBlock given index
For the past cycles, i.e. the cycles for which rewards merkle data has already been submitted,
The startBlock is calculated as below
// past cycles
if (rewardsDataMap[_index].reportingBlockNumber != 0) {
_startBlock = rewardsDataMap[_index - 1].reportingBlockNumber + 1;
_endBlock = rewardsDataMap[_index].reportingBlockNumber;
return (_startBlock, _endBlock);
}
For cycle = 1,
rewardsDataMap[_index - 1].reportingBlockNumber is 0.
Hence startBlock is returned as 1.
From next cycle onwards, startBlock would be calculated properly.
But we have checked, this method is not used anywhere in our contracts.
The above read method returns startBlock, endBlock given index
For the past cycles, i.e. the cycles for which rewards merkle data has already been submitted,
The startBlock is calculated as below
For cycle = 1,
rewardsDataMap[_index - 1].reportingBlockNumberis 0.Hence startBlock is returned as 1.
From next cycle onwards, startBlock would be calculated properly.
But we have checked, this method is not used anywhere in our contracts.