-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #612 from ava-labs/L01-unused-parameters
L-01 Unused Parameters in calculateReward
- Loading branch information
Showing
8 changed files
with
29 additions
and
57 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
abi-bindings/go/validator-manager/ERC20TokenStakingManager/ERC20TokenStakingManager.go
Large diffs are not rendered by default.
Oops, something went wrong.
28 changes: 14 additions & 14 deletions
28
abi-bindings/go/validator-manager/ExampleRewardCalculator/ExampleRewardCalculator.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
abi-bindings/go/validator-manager/NativeTokenStakingManager/NativeTokenStakingManager.go
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -240,9 +240,7 @@ abstract contract PoSValidatorManager is | |
validatorStartTime: validator.startedAt, | ||
stakingStartTime: validator.startedAt, | ||
stakingEndTime: validator.endedAt, | ||
uptimeSeconds: uptimeSeconds, | ||
initialSupply: 0, | ||
endSupply: 0 | ||
uptimeSeconds: uptimeSeconds | ||
}); | ||
$._redeemableValidatorRewards[validationID] += reward; | ||
return (reward > 0); | ||
|
@@ -572,9 +570,7 @@ abstract contract PoSValidatorManager is | |
validatorStartTime: validator.startedAt, | ||
stakingStartTime: delegator.startedAt, | ||
stakingEndTime: delegationEndTime, | ||
uptimeSeconds: $._posValidatorInfo[delegator.validationID].uptimeSeconds, | ||
initialSupply: 0, | ||
endSupply: 0 | ||
uptimeSeconds: $._posValidatorInfo[delegator.validationID].uptimeSeconds | ||
}); | ||
} | ||
Check notice Code scanning / Slither Block timestamp Low
PoSValidatorManager._calculateDelegationReward(Delegator) uses timestamp for comparisons
Dangerous comparisons: - delegationEndTime <= delegator.startedAt |
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters