From ec26d7d474aad2c4e945640af5fa37e960800e83 Mon Sep 17 00:00:00 2001 From: POA <33550681+poa@users.noreply.github.com> Date: Thu, 18 Mar 2021 12:09:14 +0300 Subject: [PATCH] Remove duplicated isReportValidatorValid function --- contracts/Certifier.sol | 2 +- contracts/ValidatorSetAuRa.sol | 6 ------ contracts/interfaces/IValidatorSetAuRa.sol | 1 - 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/contracts/Certifier.sol b/contracts/Certifier.sol index 706e986d..873deefb 100644 --- a/contracts/Certifier.sol +++ b/contracts/Certifier.sol @@ -90,7 +90,7 @@ contract Certifier is UpgradeableOwned, ICertifier { if (_certified[_who]) { return true; } - return validatorSetContract.isReportValidatorValid(_who); + return validatorSetContract.isReportValidatorValid(_who, true); } /// @dev Returns a boolean flag indicating whether the specified address is allowed to use zero gas price diff --git a/contracts/ValidatorSetAuRa.sol b/contracts/ValidatorSetAuRa.sol index 0251b680..7fadc06c 100644 --- a/contracts/ValidatorSetAuRa.sol +++ b/contracts/ValidatorSetAuRa.sol @@ -666,12 +666,6 @@ contract ValidatorSetAuRa is UpgradeabilityAdmin, IValidatorSetAuRa { return isValidatorById[idByMiningAddress[_miningAddress]]; } - /// @dev See the description of isReportValidatorValid(address,bool) below. - /// Used for backward compatibility with the Certifier contract. - function isReportValidatorValid(address _miningAddress) public view returns(bool) { - return isReportValidatorValid(_miningAddress, true); - } - /// @dev Returns a boolean flag indicating whether the specified validator (mining address) /// is able to call the `reportMalicious` function or whether the specified validator (mining address) /// can be reported as malicious. This function also allows a validator to call the `reportMalicious` diff --git a/contracts/interfaces/IValidatorSetAuRa.sol b/contracts/interfaces/IValidatorSetAuRa.sol index e0e17a2f..fb4d6d7a 100644 --- a/contracts/interfaces/IValidatorSetAuRa.sol +++ b/contracts/interfaces/IValidatorSetAuRa.sol @@ -25,7 +25,6 @@ interface IValidatorSetAuRa { function hasEverBeenMiningAddress(address) external view returns(uint256); function idByMiningAddress(address) external view returns(uint256); function idByStakingAddress(address) external view returns(uint256); - function isReportValidatorValid(address) external view returns(bool); function isReportValidatorValid(address, bool) external view returns(bool); function isValidator(address) external view returns(bool); function isValidatorById(uint256) external view returns(bool);