Skip to content

Commit

Permalink
Unlock previously disabled functions
Browse files Browse the repository at this point in the history
  • Loading branch information
varasev committed Mar 18, 2021
1 parent 455989b commit aaacae2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
17 changes: 0 additions & 17 deletions contracts/ValidatorSetAuRa.sol
Original file line number Diff line number Diff line change
Expand Up @@ -218,17 +218,6 @@ contract ValidatorSetAuRa is UpgradeabilityAdmin, IValidatorSetAuRa {

// =============================================== Setters ========================================================

// Temporary function (must be removed after upgradeToAndCall).
function migrateHasEverBeenMiningAddress() external {
require(msg.sender == _admin());
require(_currentValidators.length == 16);
for (uint256 i = 0; i < _currentValidators.length; i++) {
uint256 poolId = _currentValidators[i];
address miningAddress = miningAddressById[poolId];
hasEverBeenMiningAddress[miningAddress] = poolId;
}
}

/// @dev Makes the non-removable validator removable. Can only be called by the staking address of the
/// non-removable validator or by the `owner`.
function clearUnremovableValidator() external onlyInitialized {
Expand All @@ -246,8 +235,6 @@ contract ValidatorSetAuRa is UpgradeabilityAdmin, IValidatorSetAuRa {
/// so the mining address change is actually applied once the `finalizeChange` function is invoked.
/// @param _newMiningAddress The new mining address to set for the pool that called this function.
function changeMiningAddress(address _newMiningAddress) external onlyInitialized {
revert("Temporarily disabled");

address stakingAddress = msg.sender;
address oldMiningAddress = miningByStakingAddress[stakingAddress];
uint256 poolId = idByStakingAddress[stakingAddress];
Expand Down Expand Up @@ -309,8 +296,6 @@ contract ValidatorSetAuRa is UpgradeabilityAdmin, IValidatorSetAuRa {
/// to change mining address. Must be called by pool's staking address.
/// @param _newStakingAddress The new staking address to set for the pool that called this function.
function changeStakingAddress(address _newStakingAddress) external onlyInitialized {
revert("Temporarily disabled");

address oldStakingAddress = msg.sender;

uint256 poolId = idByStakingAddress[oldStakingAddress];
Expand Down Expand Up @@ -1151,8 +1136,6 @@ contract ValidatorSetAuRa is UpgradeabilityAdmin, IValidatorSetAuRa {
/// @param _stakingAddress The staking address of the newly created pool. Cannot be equal to the `_miningAddress`
/// and should never be used as a pool or delegator before.
function _addPool(address _miningAddress, address _stakingAddress) internal returns(uint256) {
revert("Temporarily disabled");

require(miningAddressChangeRequest.poolId == 0);
require(_miningAddress != address(0));
require(_stakingAddress != address(0));
Expand Down
2 changes: 0 additions & 2 deletions contracts/base/BlockRewardAuRaTokens.sol
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ contract BlockRewardAuRaTokens is BlockRewardAuRaBase, IBlockRewardAuRaTokens {
/// @param _nativeCoins The amount of native coins to transfer as a reward.
/// @param _to The target address to transfer the amounts to.
function transferReward(uint256 _tokens, uint256 _nativeCoins, address payable _to) external onlyStakingContract {
revert("Temporarily disabled");

if (_tokens != 0) {
IStakingAuRaTokens stakingContract = IStakingAuRaTokens(msg.sender);
IERC677 erc677TokenContract = IERC677(stakingContract.erc677TokenContract());
Expand Down

0 comments on commit aaacae2

Please sign in to comment.