mirror of
https://github.com/BunkerInnovations/duco-3ds.git
synced 2024-06-19 07:27:10 +00:00
commit
154f38f2c0
14
src/main.py
14
src/main.py
|
@ -5,7 +5,7 @@ username = "user" # Edit this to your username, mind the quotes
|
||||||
pool_address = "51.15.127.80"
|
pool_address = "51.15.127.80"
|
||||||
pool_port = 2811
|
pool_port = 2811
|
||||||
|
|
||||||
print("Starting 3DS Miner, you probably won't get any output")
|
print("Starting 3DS Miner, you probably will get Output on an error.")
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
soc.connect((str(pool_address), int(pool_port))) # Connect to the server
|
soc.connect((str(pool_address), int(pool_port))) # Connect to the server
|
||||||
|
@ -13,6 +13,7 @@ while True:
|
||||||
print("Server is on version", server_version)
|
print("Server is on version", server_version)
|
||||||
# Mining section
|
# Mining section
|
||||||
while True:
|
while True:
|
||||||
|
try:
|
||||||
soc.send(bytes("JOB," + str(username) + ",ESP32", encoding="utf8")) # Send job request
|
soc.send(bytes("JOB," + str(username) + ",ESP32", encoding="utf8")) # Send job request
|
||||||
|
|
||||||
# Don't mind the "ESP32" for now since it is in an early state
|
# Don't mind the "ESP32" for now since it is in an early state
|
||||||
|
@ -32,4 +33,13 @@ while True:
|
||||||
) # Send result of hashing algorithm to pool
|
) # Send result of hashing algorithm to pool
|
||||||
feedback = soc.recv(1024).decode() # Get feedback about the result
|
feedback = soc.recv(1024).decode() # Get feedback about the result
|
||||||
print(feedback)
|
print(feedback)
|
||||||
|
except:
|
||||||
|
while True:
|
||||||
|
try:
|
||||||
|
soc.close()
|
||||||
|
soc = socket.socket()
|
||||||
|
soc.connect((str(pool_address), int(pool_port))) # Connect to the server
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
break
|
||||||
|
|
Loading…
Reference in New Issue
Block a user