Repository navigation
sv2-tp: exit when mining backend disconnects - #115
Merged
Merged
Conversation
enochaz
force-pushed
the
07_26_clean_disconnect
branch
from
July 28, 2026 14:22
598e6b8 to
590a100
Compare
Collaborator
|
Concept ACK |
Sjors
reviewed
Jul 28, 2026
Interrupt() is called during shutdown and again by destructor cleanup. Return after the first call so backend and network interrupts are not repeated.
A closed mining backend IPC connection left sv2-tp running without a source of new templates. Probe the mining interface from the main loop and shut down when the call reports a disconnect. Stop IBD handling on the same error and avoid issuing remote interrupts after the connection is gone.
The SRI scenario previously left the mining backend running until cleanup, so it could not catch regressions in sv2-tp's runtime disconnect path. Stop the Bitcoin Core backend after mining succeeds and require sv2-tp to report the lost backend connection and exit cleanly within 30 seconds.
enochaz
force-pushed
the
07_26_clean_disconnect
branch
from
July 29, 2026 13:57
590a100 to
6abc365
Compare
Contributor
Author
Addressed the suggestions made You might notice that the commits were restructured a bit. While introducing I did not like that code churn, so i restructured the commit, the first commit now only ensures repeated calls to |
Collaborator
|
ACK 6abc365 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This implements the simpler approach discussed in #101.
Previously, when the mining backend IPC connection was lost,
sv2-tpremained running even though it could no longer provide new templates.Instead of reconnecting and preserving existing client connections,
sv2-tpnow probes the mining interface, detects the disconnect, and exits cleanly. Shutdown avoids making further calls through the lost IPC connection.Also added an integration test scenario that now stops the mingn backend and checks that
sv2-tpreports the disconnect and exits successfully.Closes #97.