-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for client.reconnect method in Stratum V1 protocol #333
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have a better commit message. Include the context/module and issue # after the body.
Also, please include instructions on how to verify.
… global_state->sock to -1 when it's closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay, I finally got my environment all setup again and my Bitaxe Ultra going. Unfortunately, my device failed to connect to public-pool after sending the reconnect.
I (94975) stratum_api: tx: {"id": 49, "method": "mining.submit", "params": ["bc1q69arrz589lcnm9pzmvxf8e9h5qycf8k42jkh99.bitaxeUltra201", "0002", "21000000", "66f1c2f2", "02790094", "00ddc000"]}
I (95295) stratum_task: Socket created, connecting to 192.168.1.148:21496
E (95295) stratum_task: Socket unable to connect to public-pool.io:21496 (errno 104)
You need to break one more loop so that DNS resolution can happen again. Here are my suggested changes
|
#41
This adds support for the client.reconnect method. This allows the miner to handle client.reconnect messages sent by pools, setting the miner to reconnect to a different host and port, optionally after a specified wait time (defaults to 1 second).
Changes:
Test instructions:
python3 server.py
reconnect
, enter hostpublic-pool.io
and port21496
Received client.reconnect: host=public-pool.io, port=21496, wait=10