Skip to content

Commit

Permalink
Contract small cleanup (#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fly-Style authored Nov 20, 2024
1 parent ea65a3f commit 47185a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contracts/evm/src/base/utils/RollupOperators.sol
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,9 @@ library RollupOperators {

require(pairingSuccessful, "Pairing precompile call failed");
require(signatureIsValid, "Signature is invalid");
require(weight <= type(uint256).max / THRESHOLD_DENOMINATOR, "Weight too large");

return weight >= (self.totalWeight * self.quorumThreshold) / THRESHOLD_DENOMINATOR;
return weight * THRESHOLD_DENOMINATOR >= (uint256(self.totalWeight) * self.quorumThreshold);
}

/**
Expand Down

0 comments on commit 47185a6

Please sign in to comment.