From c87a765765dcad87b52bdf861e7486bedc370e1e Mon Sep 17 00:00:00 2001 From: Rima <153289003+casks-mutters@users.noreply.github.com> Date: Mon, 17 Nov 2025 04:16:49 -0500 Subject: [PATCH] Fix inner try/except: assign val and correct indentation = get_storage_at(...) with no variable name and a broken retry block --- slot_change_stream.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/slot_change_stream.py b/slot_change_stream.py index e7332d2..f4f2b50 100644 --- a/slot_change_stream.py +++ b/slot_change_stream.py @@ -114,13 +114,17 @@ def stream(args): # progress through new blocks up to latest while current <= latest and not stop_flag["stop"]: - try: + try: blk = w3.eth.get_block(current) - = get_storage_at(w3, address, slot, current) + val = get_storage_at(w3, address, slot, current) except Exception as e: - time.sleep(0.3) - try: blk = w3.eth.get_block(current); val = get_storage_at(w3, address, slot, current) - except Exception as e2: print(f"⚠️ Block {current} fetch error (after retry): {e2}"); break + time.sleep(0.3) + try: + blk = w3.eth.get_block(current) + val = get_storage_at(w3, address, slot, current) + except Exception as e2: + print(f"⚠️ Block {current} fetch error (after retry): {e2}", file=sys.stderr) + break leaf = leaf_commitment(chain_id, address, slot, current, val)