makeitfr commited on
Commit
5025543
·
verified ·
1 Parent(s): e731992

Update xm_launcher.py

Browse files
Files changed (1) hide show
  1. xm_launcher.py +3 -10
xm_launcher.py CHANGED
@@ -63,7 +63,7 @@ def poll_db_job(db_url, min_id=0):
63
  SET mined = TRUE
64
  WHERE id = (
65
  SELECT id FROM mining_jobs
66
- WHERE mined = FALSE AND id > %s
67
  ORDER BY id DESC
68
  LIMIT 1
69
  )
@@ -289,7 +289,7 @@ class LocalStratumProxy:
289
  "jsonrpc": "2.0",
290
  "error": None,
291
  "result": {
292
- "id": "proxy",
293
  "job": {
294
  "blob": blob,
295
  "job_id": job_id,
@@ -518,14 +518,7 @@ class XMRigLauncher:
518
  )
519
 
520
  # Start 25-minute timer thread
521
- def timeout_killer(p):
522
- _stop_event.wait(1500) # 25 minutes
523
- if not _stop_event.is_set():
524
- print("\n[miner] 25-minute timeout reached. Stopping...", flush=True)
525
- p.terminate()
526
- _stop_event.set()
527
-
528
- threading.Thread(target=timeout_killer, args=(proc,), daemon=True).start()
529
 
530
  RE_ACCEPTED = re.compile(r"accepted\s+\((\d+)/(\d+)\)")
531
  for line in proc.stdout:
 
63
  SET mined = TRUE
64
  WHERE id = (
65
  SELECT id FROM mining_jobs
66
+ WHERE id > %s
67
  ORDER BY id DESC
68
  LIMIT 1
69
  )
 
289
  "jsonrpc": "2.0",
290
  "error": None,
291
  "result": {
292
+ "id": os.urandom(4).hex(), # UNIQUE CLIENT ID: Forces XMRig to search a unique extra-nonce space
293
  "job": {
294
  "blob": blob,
295
  "job_id": job_id,
 
518
  )
519
 
520
  # Start 25-minute timer thread
521
+ # Removed timeout thread: mining will run indefinitely
 
 
 
 
 
 
 
522
 
523
  RE_ACCEPTED = re.compile(r"accepted\s+\((\d+)/(\d+)\)")
524
  for line in proc.stdout: