From 29f7acd23152c1b0e2ec722d0d783bcf1e5bbe0b Mon Sep 17 00:00:00 2001 From: soloseng <102702451+soloseng@users.noreply.github.com> Date: Tue, 24 Sep 2024 16:18:36 -0400 Subject: [PATCH] using separate mapping for groups and validators score keeping --- .../protocol/contracts-0.8/common/ScoreManager.sol | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/protocol/contracts-0.8/common/ScoreManager.sol b/packages/protocol/contracts-0.8/common/ScoreManager.sol index c8075d52733..6e7d298585f 100644 --- a/packages/protocol/contracts-0.8/common/ScoreManager.sol +++ b/packages/protocol/contracts-0.8/common/ScoreManager.sol @@ -6,7 +6,8 @@ import "../../contracts/common/interfaces/ICeloVersionedContract.sol"; import "@openzeppelin/contracts8/access/Ownable.sol"; contract ScoreManager is Initializable, Ownable { - mapping(address => uint256) public scores; + mapping(address => uint256) public groupScores; + mapping(address => uint256) public validatorsScores; /** * @notice Sets initialized == true on implementation contracts @@ -22,19 +23,19 @@ contract ScoreManager is Initializable, Ownable { } function setGroupScore(address group, uint256 score) external onlyOwner { - scores[group] = score; + groupScores[group] = score; } function setValidatorScore(address validator, uint256 score) external onlyOwner { - scores[validator] = score; + validatorsScores[validator] = score; } function getGroupScore(address group) external view returns (uint256) { - return scores[group]; + return groupScores[group]; } function getValidatorScore(address validator) external view returns (uint256) { - return scores[validator]; + return validatorsScores[validator]; } /**