From 4d11485a1f2307fc5e3ba88c7a4543099cd47545 Mon Sep 17 00:00:00 2001 From: stubbsta Date: Thu, 30 Oct 2025 10:56:25 +0200 Subject: [PATCH] Update to clarify comments --- src/WakuRlnV2.sol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/WakuRlnV2.sol b/src/WakuRlnV2.sol index ce1bc80..4b73a7e 100644 --- a/src/WakuRlnV2.sol +++ b/src/WakuRlnV2.sol @@ -69,7 +69,7 @@ contract WakuRlnV2 is Initializable, OwnableUpgradeable, UUPSUpgradeable, Member /// @notice Flag indicating if any roots have been stored yet /// @dev Used to distinguish empty buffer from buffer with zero values - bool private rootsInitialized; // track first initialization + bool private rootsInitialized; constructor() { _disableInitializers(); @@ -207,9 +207,9 @@ contract WakuRlnV2 is Initializable, OwnableUpgradeable, UUPSUpgradeable, Member /// @notice Returns the list of recent roots, newest first function getRecentRoots() external view returns (uint256[HISTORY_SIZE] memory ordered) { - // refresh the latest root - needed if memberships were changed/erased but no new root stored yet + // Returns empty array if no roots have been stored yet if (!rootsInitialized) { - return ordered; // empty array if no roots yet + return ordered; } uint8 index = rootIndex;