@@ -243,12 +243,15 @@ contract QuantumGravityBridge is IDAOracle {
243
243
///
244
244
/// The validator set hash that is signed over is domain separated as per
245
245
/// `domainSeparateValidatorSetHash`.
246
- /// @param _newValidatorSetHash The hash of the new validator set.
247
246
/// @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.
248
250
/// @param _currentValidatorSet The current validator set.
249
251
/// @param _sigs Signatures.
250
252
function updateValidatorSet (
251
253
uint256 _newNonce ,
254
+ uint256 _oldNonce ,
252
255
uint256 _newPowerThreshold ,
253
256
bytes32 _newValidatorSetHash ,
254
257
Validator[] calldata _currentValidatorSet ,
@@ -272,7 +275,7 @@ contract QuantumGravityBridge is IDAOracle {
272
275
// Check that the supplied current validator set matches the saved checkpoint.
273
276
bytes32 currentValidatorSetHash = computeValidatorSetHash (_currentValidatorSet);
274
277
if (
275
- domainSeparateValidatorSetHash (BRIDGE_ID, currentNonce , currentPowerThreshold, currentValidatorSetHash) !=
278
+ domainSeparateValidatorSetHash (BRIDGE_ID, _oldNonce , currentPowerThreshold, currentValidatorSetHash) !=
276
279
state_lastValidatorSetCheckpoint
277
280
) {
278
281
revert SuppliedValidatorSetInvalid ();
0 commit comments