diff --git a/src/const.py b/src/const.py index fb8a640..a2434f9 100644 --- a/src/const.py +++ b/src/const.py @@ -3,8 +3,10 @@ import json DEFAULT_MODE = "production" WS_ADDR = "wss://ws.blockchain.info/coins" -SUB_MSG = json.dumps({"coin": "eth", "command": "subscribe", "entity": "confirmed_transaction"}) +# Optionally `confirmed_transaction` can be used (bursts of data instead of a steady stream, which is worse for the overall performance) +SUB_MSG = json.dumps({"coin": "eth", "command": "subscribe", "entity": "pending_transaction"}) WS_RECONNECT_PAUSE = 2 # Seconds +WS_INTERMSG_TIMEOUT = 1 # Seconds DEFAULT_EXPORT_PATH = "./data/export.json" DEFAULT_EXPORT_INTERVAL = 10800 # 3 hours