mirror of
https://github.com/jaxperro/winning-wallet-finder.git
synced 2026-07-28 00:07:47 +00:00
harden pipeline against dropped connections; publish fee-aware sharps
- get_json: catch OSError + http.client.HTTPException (RemoteDisconnected/ IncompleteRead escaped the retry loop and killed last night's validate_timing run on a single dropped keep-alive). - validate_timing: per-wallet retry+exclude guard so one bad wallet can't take out the whole selection; regenerated watch_sharps.json — the first fee-aware, resolved-only sharp list (10 copy-positive holders of 254). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+6
-1
@@ -9,6 +9,7 @@ Run a terminal scan: python3 smart_money.py --scan
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import http.client
|
||||
import json
|
||||
import ssl
|
||||
import sys
|
||||
@@ -70,7 +71,11 @@ def get_json(path, params=None, retries=2):
|
||||
req = urllib.request.Request(url, headers={"User-Agent": "Mozilla/5.0"})
|
||||
with urllib.request.urlopen(req, timeout=15, context=SSL_CTX) as r:
|
||||
return json.loads(r.read().decode())
|
||||
except (urllib.error.URLError, TimeoutError, json.JSONDecodeError):
|
||||
except (OSError, http.client.HTTPException, json.JSONDecodeError):
|
||||
# OSError covers URLError/timeouts/connection-resets; HTTPException
|
||||
# covers RemoteDisconnected/IncompleteRead — the latter used to escape
|
||||
# the retry loop and crash whole pipeline runs (validate_timing died
|
||||
# mid-scan on one dropped keep-alive connection).
|
||||
if attempt == retries:
|
||||
return None
|
||||
time.sleep(1 + attempt)
|
||||
|
||||
Reference in New Issue
Block a user