mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29:23 +00:00
Ensure a non-zero fee in the Router OutInstruction gas fuzz test
This commit is contained in:
@@ -441,6 +441,8 @@ contract Router is IRouterWithoutCollisions {
|
||||
unchecked {
|
||||
// The amount of bytes needed to represent the nonce
|
||||
uint256 bitsNeeded = 0;
|
||||
// This only iterates up to 64-bits as this will never exceed 2**64 as a matter of
|
||||
// practicality
|
||||
for (uint256 bits = 0; bits <= 64; bits += 8) {
|
||||
bool valueFits = nonce < (uint256(1) << bits);
|
||||
bool notPriorSet = bitsNeeded == 0;
|
||||
|
||||
Reference in New Issue
Block a user