Eggstravaganza

First Flight #37
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: low
Invalid

The EggHuntGame:getGameStatus() function always checks for block.timestamp < startTime, but it will never be true

[L-6] The EggHuntGame:getGameStatus() function always checks for block.timestamp < startTime, but it will never be true

Description: getGameStatus always checks for block.timestamp < startTime, but since startTime can only be set to block.timestamp, it will never be less than that, making this check unnecessary

Impact: Extra gas will be consumed checking this case that will never be true

Recommended Mitigation: Remove the first if check in the getGameStatus function

- if (block.timestamp < startTime) {
- return "Game not started yet";
Updates

Lead Judging Commences

m3dython Lead Judge about 2 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.