Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions slot_change_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down