From 424535e1f1c7534cb143034553a3ab17853856da Mon Sep 17 00:00:00 2001 From: Uncle Stretch Date: Thu, 23 Jul 2026 21:02:11 +0300 Subject: [PATCH] more gas optimizations for getProof and getRoot Signed-off-by: Uncle Stretch --- src/Gatekeeper.sol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Gatekeeper.sol b/src/Gatekeeper.sol index 7997966..57cc807 100644 --- a/src/Gatekeeper.sol +++ b/src/Gatekeeper.sol @@ -79,8 +79,8 @@ contract Gatekeeper is IGatekeeper, IGatekeeperMetadata, IGatekeeperWeaver { uint256 i; for (; i < currentLevelCount;) { uint256 j = i << 1; - bytes32 left = bytes32(_treeNodes[session][j].upperLookupRecent(atBlock)); - bytes32 right = bytes32(_treeNodes[session][j | 1].upperLookupRecent(atBlock)); + bytes32 left = bytes32(_treeNodes[session][j].upperLookup(atBlock)); + bytes32 right = bytes32(_treeNodes[session][j | 1].upperLookup(atBlock)); currentLevel[i] = Hashes.efficientKeccak256(left, right); unchecked { ++i; } @@ -115,7 +115,7 @@ contract Gatekeeper is IGatekeeper, IGatekeeperMetadata, IGatekeeperWeaver { uint256 i; for (; i < currentLevelCount;) { - currentLevel[i] = bytes32(_treeNodes[session][i].upperLookupRecent(atBlock)); + currentLevel[i] = bytes32(_treeNodes[session][i].upperLookup(atBlock)); unchecked { ++i; } }