From 451e2a46aa91621b166c51988b720233c9edc71c Mon Sep 17 00:00:00 2001 From: "Mark.B" Date: Mon, 9 Sep 2024 10:28:37 +0200 Subject: [PATCH] add check on isParticipatingInUpcomingRound --- src/Redistribution.sol | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Redistribution.sol b/src/Redistribution.sol index 0e17cb71..0a5a37b2 100644 --- a/src/Redistribution.sol +++ b/src/Redistribution.sol @@ -801,11 +801,13 @@ contract Redistribution is AccessControl, Pausable { * @param _depth The storage depth the applicant intends to report. */ function isParticipatingInUpcomingRound(address _owner, uint8 _depth) public view returns (bool) { + uint256 _lastUpdate = Stakes.lastUpdatedBlockNumberOfAddress(_owner); + if (currentPhaseReveal()) { revert WrongPhase(); } - if (Stakes.lastUpdatedBlockNumberOfAddress(_owner) >= block.number - 2 * ROUND_LENGTH) { + if (_lastUpdate >= block.number - 2 * ROUND_LENGTH && _lastUpdate > 0) { revert MustStake2Rounds(); }