we can cancel the game even before the revealDeadline
playerA creates the game and sent the gameId to playerB to participate. As there is flaw in this RockPaperScissors::timeoutReveal
playerB can be able to cancel the game even before the deadline time and playerA who created the game itself cant participate in the game
-> if anyone know that the new games are created , they can able to participate and can be able to cancel the game instantly and thus by not playing the player who has created the game itself
Issue is in the below condition in RockPaperScissors::timeoutReveal
if we can see that this game.revealDeadline
will once be updated once both the player has been commited their moves , by default of this value is zero which make block.timestamp > game.revealDeadline condition to true
Update the game.revealDeadline
, when atleast one of the player has been comitted his move
we need to update the condition in RockPaperScissors::commitMove
NOTE: by changing to the above condition , there will be an issue with RockPaperScissors::revealMove
As we all know that once can only reveal only when both the players has been commmited
timeoutJoin function allows cancellation and emits a GameCancelled event for any game ID
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.