@@ -243,12 +243,15 @@ contract QuantumGravityBridge is IDAOracle {
243243 ///
244244 /// The validator set hash that is signed over is domain separated as per
245245 /// `domainSeparateValidatorSetHash`.
246- /// @param _newValidatorSetHash The hash of the new validator set.
247246 /// @param _newNonce The new event nonce.
247+ /// @param _oldNonce The nonce of the latest update to the validator set.
248+ /// @param _newPowerThreshold At least this much power must have signed.
249+ /// @param _newValidatorSetHash The hash of the new validator set.
248250 /// @param _currentValidatorSet The current validator set.
249251 /// @param _sigs Signatures.
250252 function updateValidatorSet (
251253 uint256 _newNonce ,
254+ uint256 _oldNonce ,
252255 uint256 _newPowerThreshold ,
253256 bytes32 _newValidatorSetHash ,
254257 Validator[] calldata _currentValidatorSet ,
@@ -272,7 +275,7 @@ contract QuantumGravityBridge is IDAOracle {
272275 // Check that the supplied current validator set matches the saved checkpoint.
273276 bytes32 currentValidatorSetHash = computeValidatorSetHash (_currentValidatorSet);
274277 if (
275- domainSeparateValidatorSetHash (BRIDGE_ID, currentNonce , currentPowerThreshold, currentValidatorSetHash) !=
278+ domainSeparateValidatorSetHash (BRIDGE_ID, _oldNonce , currentPowerThreshold, currentValidatorSetHash) !=
276279 state_lastValidatorSetCheckpoint
277280 ) {
278281 revert SuppliedValidatorSetInvalid ();
0 commit comments