Skip to content

Commit 298b6d7

Browse files
committed
update name to withholding
1 parent 7c54cfd commit 298b6d7

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

contracts/FlowIDTableStaking.cdc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ access(all) contract FlowIDTableStaking {
3838
/// Epoch
3939
access(all) event NewEpoch(totalStaked: UFix64, totalRewardPayout: UFix64, newEpochCounter: UInt64)
4040
access(all) event EpochTotalRewardsPaid(total: UFix64, fromFees: UFix64, minted: UFix64, feesBurned: UFix64, epochCounterForRewards: UInt64)
41-
access(all) event NodeRewardsSetToSlash(nodeSlashPercentagesRemaining: {String: UFix64})
41+
// The single parameter is a map from node ID to the percentage of theirs and their delegator's rewards
42+
// that will remain after being withheld from the node at each subsequent payout, until the withholding map is modified again.
43+
access(all) event NodeRewardWithholdingsUpdated(nodeRewardsPercentageRemaining: {String: UFix64})
4244

4345
/// Node
4446
access(all) event NewNodeCreated(nodeID: String, role: UInt8, amountCommitted: UFix64)
@@ -53,7 +55,7 @@ access(all) contract FlowIDTableStaking {
5355
access(all) event RewardTokensWithdrawn(nodeID: String, amount: UFix64)
5456
access(all) event NetworkingAddressUpdated(nodeID: String, newAddress: String)
5557
access(all) event NodeWeightChanged(nodeID: String, newWeight: UInt64)
56-
access(all) event NodeRewardsSlashed(nodeID: String, percentageSlashed: UFix64)
58+
access(all) event NodeRewardsWithheld(nodeID: String, percentageRemaining: UFix64)
5759

5860
/// Delegator
5961
access(all) event NewDelegatorCreated(nodeID: String, delegatorID: UInt32)
@@ -948,7 +950,7 @@ access(all) contract FlowIDTableStaking {
948950
)
949951
}
950952

951-
emit NodeRewardsSetToSlash(nodeSlashPercentagesRemaining: nodeIDs)
953+
emit NodeRewardWithholdingsUpdated(nodeRewardsPercentageRemaining: nodeIDs)
952954
FlowIDTableStaking.account.storage.load<{String: UFix64}>(from: /storage/idTableNonOperationalNodesList)
953955
FlowIDTableStaking.account.storage.save<{String: UFix64}>(nodeIDs, to: /storage/idTableNonOperationalNodesList)
954956
}
@@ -1342,7 +1344,7 @@ access(all) contract FlowIDTableStaking {
13421344
// Its delegator's rewards are also decreased to the same percentage
13431345
let rewardDecreaseToPercentage = nonOperationalNodes[nodeID]!
13441346

1345-
emit NodeRewardsSlashed(nodeID: nodeID, percentageSlashed: 1.0 - rewardDecreaseToPercentage)
1347+
emit NodeRewardsWithheld(nodeID: nodeID, percentageRemaining: rewardDecreaseToPercentage)
13461348

13471349
sumStakeFromNonOperationalStakers = sumStakeFromNonOperationalStakers + nodeRecord.tokensStaked.balance
13481350

lib/go/contracts/internal/assets/assets.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)