4141//! specific features, set `default-features` to `false` in your `Cargo.toml`
4242//! and specify the features you want. This will look like this:
4343//!
44- //! `esplora-client = { version = "*", default-features = false, features = ["blocking"] }`
44+ //! `esplora-client = { version = "*", default-features = false, features =
45+ //! ["blocking"] }`
4546//!
4647//! * `blocking` enables [`minreq`], the blocking client with proxy.
47- //! * `blocking-https` enables [`minreq`], the blocking client with proxy and TLS (SSL)
48- //! capabilities using the default [`minreq`] backend.
48+ //! * `blocking-https` enables [`minreq`], the blocking client with proxy and TLS (SSL) capabilities
49+ //! using the default [`minreq`] backend.
4950//! * `blocking-https-rustls` enables [`minreq`], the blocking client with proxy and TLS (SSL)
5051//! capabilities using the `rustls` backend.
5152//! * `blocking-https-native` enables [`minreq`], the blocking client with proxy and TLS (SSL)
6263//! * `async-https-rustls-manual-roots` enables [`reqwest`], the async client with support for
6364//! proxying and TLS (SSL) using the `rustls` TLS backend without using its the default root
6465//! certificates.
65- //!
66- //!
6766
6867#![ allow( clippy:: result_large_err) ]
6968
@@ -89,7 +88,8 @@ pub use r#async::AsyncClient;
8988/// Get a fee value in sats/vbytes from the estimates
9089/// that matches the confirmation target set as parameter.
9190///
92- /// Returns `None` if no feerate estimate is found at or below `target` confirmations.
91+ /// Returns `None` if no feerate estimate is found at or below `target`
92+ /// confirmations.
9393pub fn convert_fee_rate ( target : usize , estimates : HashMap < u16 , f64 > ) -> Option < f32 > {
9494 estimates
9595 . into_iter ( )
@@ -103,11 +103,13 @@ pub struct Builder {
103103 pub base_url : String ,
104104 /// Optional URL of the proxy to use to make requests to the Esplora server
105105 ///
106- /// The string should be formatted as: `<protocol>://<user>:<password>@host:<port>`.
106+ /// The string should be formatted as:
107+ /// `<protocol>://<user>:<password>@host:<port>`.
107108 ///
108- /// Note that the format of this value and the supported protocols change slightly between the
109- /// blocking version of the client (using `minreq`) and the async version (using `reqwest`). For more
110- /// details check with the documentation of the two crates. Both of them are compiled with
109+ /// Note that the format of this value and the supported protocols change
110+ /// slightly between the blocking version of the client (using `minreq`)
111+ /// and the async version (using `reqwest`). For more details check with
112+ /// the documentation of the two crates. Both of them are compiled with
111113 /// the `socks` feature enabled.
112114 ///
113115 /// The proxy is ignored when targeting `wasm32`.
@@ -594,8 +596,8 @@ mod test {
594596 #[ cfg( all( feature = "blocking" , feature = "async" ) ) ]
595597 #[ tokio:: test]
596598 async fn test_get_non_existing_block_status ( ) {
597- // Esplora returns the same status for orphaned blocks as for non-existing blocks:
598- // non-existing: https://blockstream.info/api/block/0000000000000000000000000000000000000000000000000000000000000000/status
599+ // Esplora returns the same status for orphaned blocks as for non-existing
600+ // blocks: non-existing: https://blockstream.info/api/block/0000000000000000000000000000000000000000000000000000000000000000/status
599601 // orphaned: https://blockstream.info/api/block/000000000000000000181b1a2354620f66868a723c0c4d5b24e4be8bdfc35a7f/status
600602 // (Here the block is cited as orphaned: https://bitcoinchain.com/block_explorer/block/000000000000000000181b1a2354620f66868a723c0c4d5b24e4be8bdfc35a7f/ )
601603 // For this reason, we only test for the non-existing case here.
0 commit comments