-
Notifications
You must be signed in to change notification settings - Fork 50
docs: add example for EsploraClient with timeout configuration #359
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
base: master
Are you sure you want to change the base?
docs: add example for EsploraClient with timeout configuration #359
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #359 +/- ##
=======================================
Coverage 85.24% 85.24%
=======================================
Files 23 23
Lines 8230 8230
=======================================
Hits 7016 7016
Misses 1214 1214
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
AdamuAbba
left a comment
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.
cACK a63ddd5
- I've tested the example locally and it seems to work fine.
- I've left a comment regarding the extra comment on the
README
README.md
Outdated
|
|
||
| * [`examples/esplora_async`](https://github.com/bitcoindevkit/bdk_wallet/tree/master/examples/esplora_async) | ||
| * [`examples/esplora_blocking`](https://github.com/bitcoindevkit/bdk_wallet/tree/master/examples/esplora_blocking) | ||
| * [`examples/esplora_with_timeout`](https://github.com/bitcoindevkit/bdk_wallet/tree/master/examples/esplora_with_timeout) - Demonstrates custom timeout and retry configuration |
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.
I think the comment is unnecessary, and just listing the example should suffice.
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.
Removed the comment
Add a new example demonstrating how to configure EsploraClient with custom timeout and retry settings. This is useful for developers working with slow or unreliable network connections. The example shows: - Setting socket timeout using Builder::timeout() - Configuring max retries using Builder::max_retries() - Handling timeout-related errors gracefully Closes bitcoindevkit#260 Signed-off-by: Eeshu-Yadav <[email protected]>
a63ddd5 to
f60708b
Compare
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.
Pull request overview
This PR adds a new example demonstrating how to configure EsploraClient with custom timeout and retry settings for developers working with potentially slow or unreliable network connections.
- Adds
esplora_with_timeout.rsexample showing Builder::timeout() and Builder::max_retries() configuration - Includes comprehensive error handling with helpful tips for timeout failures
- Updates documentation to reference the new example
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| examples/esplora_with_timeout.rs | New example demonstrating EsploraClient configuration with custom timeout (30s) and retry settings (3 retries), including graceful error handling |
| README.md | Adds reference to the new esplora_with_timeout example in the blockchain data sources section |
| Cargo.toml | Registers the new example in the build configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
Add a new example demonstrating how to configure EsploraClient with custom timeout and retry settings. This is useful for developers working with slow or unreliable network connections.
The example shows:
Closes #260
Checklists
All Submissions:
just pbefore pushingFeatures: