Skip to content
Merged
Changes from 1 commit
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
15 changes: 8 additions & 7 deletions miners/macos/rustchain_mac_miner_v2.5.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
- Persistent launchd/cron integration helpers
- Sleep-resistant: re-attest on wake automatically
"""
import warnings

import os
import sys
import json
Expand Down Expand Up @@ -62,9 +60,6 @@ def error(msg): return msg
BLOCK_TIME = 600 # 10 minutes
LOTTERY_CHECK_INTERVAL = 10

# TLS verification: pinned cert or system CA bundle
_CERT_PATH = os.path.expanduser("~/.rustchain/node_cert.pem")
TLS_VERIFY = _CERT_PATH if os.path.exists(_CERT_PATH) else True
ATTESTATION_TTL = 580 # Re-attest 20s before expiry


Expand All @@ -84,11 +79,17 @@ def __init__(self, node_url, proxy_url):
self._probe_transport()

def _probe_transport(self):
"""Test if we can reach the node directly via HTTPS."""
"""Test if we can reach the node directly via HTTPS.

Use verify=False consistently with all subsequent API calls
(self.get/self.post). The probe's only job is to detect whether
direct connectivity works — TLS verification is handled by the
proxy tunnel or pinned cert when present.
"""
try:
r = requests.get(
self.node_url + "/health",
timeout=10, verify=TLS_VERIFY
timeout=10, verify=False
)
if r.status_code == 200:
print(success("[TRANSPORT] Direct HTTPS to node: OK"))
Expand Down
Loading