startPreparation() access
@@ -76,14 +76,11 @@ contract UpgradeGatekeeper is UpgradeEvents, Ownable {
emit UpgradeCancel();
}
- /// @notice Checks that preparation status is active and activates it if needed
- /// @return Bool flag indicating that preparation status is active after this call
- function startPreparation() public returns (bool) {
- require(upgradeStatus != UpgradeStatus.Idle, "ugp11"); // ugp11 - unable to activate preparation status in case of not active upgrade mode
-
- if (upgradeStatus == UpgradeStatus.Preparation) {
- return true;
- }
+ /// @notice Activates preparation status
+ /// @return Bool flag indicating that preparation status has been successfully activated
+ function startPreparation() external returns (bool) {
+ requireMaster(msg.sender);
+ require(upgradeStatus == UpgradeStatus.NoticePeriod, "ugp11"); // ugp11 - unable to activate preparation status in case of not active notice period status
if (now >= noticePeriodActivationTime + mainContract.upgradeNoticePeriod()) {
upgradeStatus = UpgradeStatus.Preparation;
