Add Electrum connection timeout to prevent thread pool exhaustion#75
Open
ben-kaufman wants to merge 1 commit intomainfrom
Open
Add Electrum connection timeout to prevent thread pool exhaustion#75ben-kaufman wants to merge 1 commit intomainfrom
ben-kaufman wants to merge 1 commit intomainfrom
Conversation
034be95 to
831fff1
Compare
Comment on lines
+3333
to
+3334
| } | ||
| #[tokio::test(flavor = "multi_thread", worker_threads = 1)] |
There was a problem hiding this comment.
Missing blank line between test functions — cargo fmt would insert one here.
Every other top-level item boundary in this file uses a blank line separator (47 occurrences of }\n\n#[ vs. this single }\n#[). cargo fmt enforces blank lines between top-level items.
See CLAUDE.md rule: "ALWAYS run cargo fmt before committing to ensure consistent code formatting".
Suggested change
| } | |
| #[tokio::test(flavor = "multi_thread", worker_threads = 1)] | |
| } | |
| #[tokio::test(flavor = "multi_thread", worker_threads = 1)] |
…0.7.0-rc.32 Made-with: Cursor
831fff1 to
86337be
Compare
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.
Summary
Bumps the Synonym Fork to
v0.7.0-rc.33and adds aconnection_timeout_secsfield toElectrumSyncConfig(default: 10 s). This bounds Electrum socket operations for both the BDK on-chain and LDK tx-sync clients, preventing Tokio's blocking thread pool from being exhausted by threads stuck on dead sockets under total packet loss (e.g. a captive portal on iOS).Changes
connection_timeout_secs: u64field toElectrumSyncConfig(default: 10 s). Set to0to disable; values above 255 are capped to 255 with a warning logged.Breaking change: existing struct-literal construction of
ElectrumSyncConfigmust add the newconnection_timeout_secsfield or switch toElectrumSyncConfig { .., ..Default::default() }.Testing
connection_timeout_secs = 0disables the timeout.