Skip to content

Conversation

@Eeshu-Yadav
Copy link

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:

  • Setting socket timeout using Builder::timeout()
  • Configuring max retries using Builder::max_retries()
  • Handling timeout-related errors gracefully

Closes #260

Checklists

All Submissions:

Features:

  • I've added example for the feature

@ValuedMammal ValuedMammal added the documentation Improvements or additions to documentation label Dec 27, 2025
@codecov
Copy link

codecov bot commented Dec 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.24%. Comparing base (bec219a) to head (a63ddd5).

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           
Flag Coverage Δ
rust 85.24% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@AdamuAbba AdamuAbba left a 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

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.

Copy link
Author

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]>
Copilot AI review requested due to automatic review settings January 3, 2026 02:13
@Eeshu-Yadav Eeshu-Yadav force-pushed the docs/esplora-timeout-example branch from a63ddd5 to f60708b Compare January 3, 2026 02:13
Copy link

Copilot AI left a 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.rs example 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Add example for using EsploraClient with timeout configuration

3 participants