From 6653e71abc90ca332e9d77c6c49d53f2cf657423 Mon Sep 17 00:00:00 2001 From: derekpierre Date: Fri, 26 Jan 2024 21:56:47 -0500 Subject: [PATCH] Fix use of sentinel participant. --- contracts/contracts/coordination/Coordinator.sol | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/contracts/contracts/coordination/Coordinator.sol b/contracts/contracts/coordination/Coordinator.sol index 097d9e48..736ce660 100644 --- a/contracts/contracts/coordination/Coordinator.sol +++ b/contracts/contracts/coordination/Coordinator.sol @@ -431,7 +431,7 @@ contract Coordinator is Initializable, AccessControlDefaultAdminRulesUpgradeable ) internal view returns (bool, uint256, Participant storage participant) { uint256 length = ritual.participant.length; if (length == 0) { - return (false, 0, SENTINEL_PARTICIPANT); + return (false, 0, sentinelParticipant); } uint256 low = 0; uint256 high = length - 1; @@ -444,7 +444,7 @@ contract Coordinator is Initializable, AccessControlDefaultAdminRulesUpgradeable low = mid + 1; } else if (high == 0) { // prevent underflow of unsigned int - return (false, 0, SENTINEL_PARTICIPANT); + return (false, 0, sentinelParticipant); } else { high = mid - 1; } @@ -469,7 +469,10 @@ contract Coordinator is Initializable, AccessControlDefaultAdminRulesUpgradeable bool transcript ) public view returns (Participant memory, uint256) { Ritual storage ritual = rituals[ritualId]; - (bool found, uint256 index, Participant memory participant) = findParticipant(ritual, provider); + (bool found, uint256 index, Participant memory participant) = findParticipant( + ritual, + provider + ); if (!found) { revert("Participant not part of ritual"); }