Electrum params (3.0)#1011
Conversation
|
@reez could you add a commit for the bump of bdk_electrum to 0.24.0 to this PR? |
| 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 |
There was a problem hiding this comment.
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 builderhttps://docs.rs/electrum-client/0.24.1/src/electrum_client/config.rs.html#57-61
There was a problem hiding this comment.
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)|
bdk_electrum updated & changelog reflected |
Description
#1010 for 3.0 branch
Notes to the reviewers
Documentation
bdk_walletbitcoinuniffiChangelog
Checklists
All Submissions:
cargo fmtandcargo clippybefore committingchangelog:*labelNew Features:
Bugfixes: