Skip to content

Commit

Permalink
Add named mapping params inside epoch snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike-CZ committed Dec 13, 2024
1 parent e86e5db commit 29370e6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions contracts/sfc/SFC.sol
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,17 @@ contract SFC is OwnableUpgradeable, UUPSUpgradeable, Version {

struct EpochSnapshot {
// validator ID => validator weight in the epoch
mapping(uint256 => uint256) receivedStake;
mapping(uint256 validatorID => uint256) receivedStake;
// validator ID => accumulated ( delegatorsReward * 1e18 / receivedStake )
mapping(uint256 => uint256) accumulatedRewardPerToken;
mapping(uint256 validatorID => uint256) accumulatedRewardPerToken;
// validator ID => accumulated online time
mapping(uint256 => uint256) accumulatedUptime;
mapping(uint256 validatorID => uint256) accumulatedUptime;
// validator ID => average uptime as a percentage
mapping(uint256 => AverageUptime) averageUptime;
mapping(uint256 validatorID => AverageUptime) averageUptime;
// validator ID => gas fees from txs originated by the validator
mapping(uint256 => uint256) accumulatedOriginatedTxsFee;
mapping(uint256 => uint256) offlineTime;
mapping(uint256 => uint256) offlineBlocks;
mapping(uint256 validatorID => uint256) accumulatedOriginatedTxsFee;
mapping(uint256 validatorID => uint256) offlineTime;
mapping(uint256 validatorID => uint256) offlineBlocks;
uint256[] validatorIDs;
uint256 endTime;
uint256 endBlock;
Expand Down

0 comments on commit 29370e6

Please sign in to comment.