From 89efe1a078051a9b33f814f1aa27761ddd2754e5 Mon Sep 17 00:00:00 2001 From: Florian Date: Thu, 11 Apr 2024 16:52:30 +0300 Subject: [PATCH] revert --- src/examples/zkapps/reducer/actions-as-merkle-list.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/examples/zkapps/reducer/actions-as-merkle-list.ts b/src/examples/zkapps/reducer/actions-as-merkle-list.ts index eb0ac18a0f..16ce8ea29c 100644 --- a/src/examples/zkapps/reducer/actions-as-merkle-list.ts +++ b/src/examples/zkapps/reducer/actions-as-merkle-list.ts @@ -85,13 +85,11 @@ class ActionsContract extends SmartContract { // (note: if we're past the actual sizes, `.pop()` returns a dummy Action -- in this case, the "empty" public key which is not equal to any real address) let hasAddress = Bool(false); - let iter = merkleActionss.startIterating(); - for (let i = 0; i < MAX_UPDATES_WITH_ACTIONS; i++) { - let merkleActions = iter.next(); - let innerIter = merkleActions.startIterating(); + let merkleActions = merkleActionss.pop(); + for (let j = 0; j < MAX_ACTIONS_PER_UPDATE; j++) { - let action = innerIter.next(); + let action = merkleActions.pop(); hasAddress = hasAddress.or(action.equals(address)); } }