41
41
//! specific features, set `default-features` to `false` in your `Cargo.toml`
42
42
//! and specify the features you want. This will look like this:
43
43
//!
44
- //! `esplora-client = { version = "*", default-features = false, features = ["blocking"] }`
44
+ //! `esplora-client = { version = "*", default-features = false, features =
45
+ //! ["blocking"] }`
45
46
//!
46
47
//! * `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.
49
50
//! * `blocking-https-rustls` enables [`minreq`], the blocking client with proxy and TLS (SSL)
50
51
//! capabilities using the `rustls` backend.
51
52
//! * `blocking-https-native` enables [`minreq`], the blocking client with proxy and TLS (SSL)
62
63
//! * `async-https-rustls-manual-roots` enables [`reqwest`], the async client with support for
63
64
//! proxying and TLS (SSL) using the `rustls` TLS backend without using its the default root
64
65
//! certificates.
65
- //!
66
- //!
67
66
68
67
#![ allow( clippy:: result_large_err) ]
69
68
@@ -89,7 +88,8 @@ pub use r#async::AsyncClient;
89
88
/// Get a fee value in sats/vbytes from the estimates
90
89
/// that matches the confirmation target set as parameter.
91
90
///
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.
93
93
pub fn convert_fee_rate ( target : usize , estimates : HashMap < u16 , f64 > ) -> Option < f32 > {
94
94
estimates
95
95
. into_iter ( )
@@ -103,11 +103,13 @@ pub struct Builder {
103
103
pub base_url : String ,
104
104
/// Optional URL of the proxy to use to make requests to the Esplora server
105
105
///
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>`.
107
108
///
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
111
113
/// the `socks` feature enabled.
112
114
///
113
115
/// The proxy is ignored when targeting `wasm32`.
@@ -594,8 +596,8 @@ mod test {
594
596
#[ cfg( all( feature = "blocking" , feature = "async" ) ) ]
595
597
#[ tokio:: test]
596
598
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
599
601
// orphaned: https://blockstream.info/api/block/000000000000000000181b1a2354620f66868a723c0c4d5b24e4be8bdfc35a7f/status
600
602
// (Here the block is cited as orphaned: https://bitcoinchain.com/block_explorer/block/000000000000000000181b1a2354620f66868a723c0c4d5b24e4be8bdfc35a7f/ )
601
603
// For this reason, we only test for the non-existing case here.
0 commit comments