@@ -209,9 +209,13 @@ contract XanV1 is
209209 {
210210 Council.Data storage councilData = _getCouncilData ();
211211 if (councilData.scheduledEndTime != 0 && councilData.scheduledImpl != address (0 )) {
212- _cancelCouncilUpgrade ();
212+ // TODO! Ask Chris: Should we check `_checkDelayCriterion(councilData.scheduledEndTime);`
213213
214- emit CouncilUpgradeVetoed (); // TODO! Revisit event args
214+ emit CouncilUpgradeVetoed (councilData.scheduledImpl);
215+
216+ // Reset the scheduled
217+ councilData.scheduledImpl = address (0 );
218+ councilData.scheduledEndTime = 0 ;
215219 }
216220 }
217221 }
@@ -220,10 +224,9 @@ contract XanV1 is
220224 function cancelVoterBodyUpgrade () external override {
221225 Voting.Data storage data = _getVotingData ();
222226
227+ // TODO! Confirm with Chris
223228 _checkDelayCriterion (data.scheduledEndTime);
224229
225- // TODO! check min quorum
226-
227230 // Revert the cancellation if the currently scheduled implementation still
228231 // * meets the quorum and minimum locked supply for the
229232 // * is the best ranked implementation
@@ -235,7 +238,7 @@ contract XanV1 is
235238 revert UpgradeCancellationInvalid (data.scheduledImpl, data.scheduledEndTime);
236239 }
237240
238- emit VoterBodyUpgradeCancelled (data.scheduledImpl, data.scheduledEndTime );
241+ emit VoterBodyUpgradeCancelled (data.scheduledImpl);
239242
240243 // Reset the scheduled upgrade
241244 data.scheduledImpl = address (0 );
@@ -271,8 +274,15 @@ contract XanV1 is
271274
272275 /// @notice @inheritdoc IXanV1
273276 function cancelCouncilUpgrade () external override onlyCouncil {
274- emit CouncilUpgradeCancelled ();
275- _cancelCouncilUpgrade ();
277+ Council.Data storage data = _getCouncilData ();
278+
279+ // TODO! Ask Chris: Should we check `_checkDelayCriterion(data.scheduledEndTime);`
280+
281+ emit CouncilUpgradeCancelled (data.scheduledImpl);
282+
283+ // Reset the scheduled
284+ data.scheduledImpl = address (0 );
285+ data.scheduledEndTime = 0 ;
276286 }
277287
278288 /// @notice @inheritdoc IXanV1
@@ -290,10 +300,15 @@ contract XanV1 is
290300 revert QuorumOrMinLockedSupplyNotReached (bestRankedImplementation);
291301 }
292302
293- emit CouncilUpgradeVetoed ();
303+ Council.Data storage data = _getCouncilData ();
304+
305+ // TODO! Ask Chris: Should we check `_checkDelayCriterion(data.scheduledEndTime);`
294306
295- // Cancel the council upgrade
296- _cancelCouncilUpgrade ();
307+ emit CouncilUpgradeVetoed (data.scheduledImpl);
308+
309+ // Reset the scheduled upgrade
310+ data.scheduledImpl = address (0 );
311+ data.scheduledEndTime = 0 ;
297312 }
298313
299314 /// @inheritdoc IXanV1
@@ -400,14 +415,6 @@ contract XanV1 is
400415 emit Locked ({account: account, value: value});
401416 }
402417
403- /// @notice Cancels the scheduled upgrade by the council by resetting it to 0.
404- function _cancelCouncilUpgrade () internal {
405- Council.Data storage data = _getCouncilData ();
406-
407- data.scheduledImpl = address (0 );
408- data.scheduledEndTime = 0 ;
409- }
410-
411418 /// @notice Authorizes an upgrade.
412419 /// @param newImpl The new implementation to authorize the upgrade to.
413420 function _authorizeUpgrade (address newImpl ) internal view override {
0 commit comments