Skip to content

Electrum params (3.0)#1011

Merged
thunderbiscuit merged 5 commits into
bitcoindevkit:release/3.0from
reez:timeout-3
May 22, 2026
Merged

Electrum params (3.0)#1011
thunderbiscuit merged 5 commits into
bitcoindevkit:release/3.0from
reez:timeout-3

Conversation

@reez
Copy link
Copy Markdown
Collaborator

@reez reez commented May 22, 2026

Description

#1010 for 3.0 branch

Notes to the reviewers

Documentation

Changelog

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing
  • I've added exactly one changelog:* label
  • I've linked the relevant upstream docs or specs above

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature

Bugfixes:

  • This pull request breaks the existing API
  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

@reez reez requested a review from thunderbiscuit May 22, 2026 17:00
@reez reez mentioned this pull request May 22, 2026
14 tasks
@thunderbiscuit
Copy link
Copy Markdown
Member

@reez could you add a commit for the bump of bdk_electrum to 0.24.0 to this PR?

Comment thread bdk-ffi/src/electrum.rs Outdated
impl ElectrumClient {
/// Creates a new bdk client from a electrum_client::ElectrumApi
/// Optional: Set the proxy of the builder
/// Optional: Set the timeout of the builder
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Rust docs make the mistake of not defining what the unit is on the timeout, but I don't think we should make that same mistake because ffi users have an even harder time digging into the source code that is used to generate the bindings (you can't "command+click" into a type/method and see the Rust source).

I suggest you make the correction here and we open a PR on Electrum to fix it too.

// Optional: Set the timeout (in seconds) of the builder

https://docs.rs/electrum-client/0.24.1/src/electrum_client/config.rs.html#57-61

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok actually this API changed in the 0.25.0 release, and the timeout method takes a Duration argument rather than a u8.

So there is no documentation problem on the Rust side anymore, but I suggest we keep the u8 argument (and the docs mentioning this is defined in seconds) here and you transform it into a Duration in the loop, something like

Duration::from_secs(timeout)

@reez
Copy link
Copy Markdown
Collaborator Author

reez commented May 22, 2026

bdk_electrum updated & changelog reflected

@reez reez requested a review from thunderbiscuit May 22, 2026 18:32
Copy link
Copy Markdown
Member

@thunderbiscuit thunderbiscuit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 69c29f9.

@thunderbiscuit thunderbiscuit merged commit 69c29f9 into bitcoindevkit:release/3.0 May 22, 2026
8 checks passed
@reez reez deleted the timeout-3 branch May 22, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants