Skip to content

Commit 59fb9e8

Browse files
Update contracts/contracts/l1/rollup/L1MessageQueueWithGasPriceOracle.sol
Co-authored-by: vincent <[email protected]>
1 parent 0e7472b commit 59fb9e8

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

contracts/contracts/l1/rollup/L1MessageQueueWithGasPriceOracle.sol

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -259,15 +259,9 @@ contract L1MessageQueueWithGasPriceOracle is OwnableUpgradeable, IL1MessageQueue
259259
}
260260

261261
function getFirstUnfinalizedMessageEnqueueTime() external view returns (uint256 timestamp) {
262-
if (pendingQueueIndex < messageQueue.length) {
263-
// has pending messages
264-
if (messageEnqueueTime[pendingQueueIndex] == 0) {
265-
// no enqueue time, return current timestamp
266-
return block.timestamp;
267-
} else {
268-
// return enqueue time
262+
if (pendingQueueIndex < messageQueue.length && messageEnqueueTime[pendingQueueIndex] != 0) {
263+
// has pending messages and return enqueue time
269264
return messageEnqueueTime[pendingQueueIndex];
270-
}
271265
}
272266
// no pending messages, return current timestamp
273267
return block.timestamp;

0 commit comments

Comments
 (0)