Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/cont_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ jobs:
run: |
cargo update -p tokio --precise 1.29.1
cargo update -p reqwest --precise 0.11.18
cargo update -p rustls:0.20.9 --precise 0.20.8
cargo update -p rustix --precise 0.38.6
cargo update -p rustls:0.21.7 --precise 0.21.1
cargo update -p rustix --precise 0.38.6
cargo update -p hyper-rustls:0.24.1 --precise 0.24.0
cargo update -p rustls-webpki:0.100.3 --precise 0.100.1
cargo update -p rustls-webpki:0.101.6 --precise 0.101.1
Expand Down
10 changes: 4 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,15 @@ path = "src/lib.rs"
[dependencies]
serde = { version = "1.0", features = ["derive"] }
bitcoin = { version = "0.30.0", features = ["serde", "std"], default-features = false }
# Temporary dependency on internals until the rust-bitcoin devs release the hex-conservative crate.
bitcoin-internals = { version = "0.1.0", features = ["alloc"] }
hex-conservative = { version = "0.1"}
Copy link
Contributor

Choose a reason for hiding this comment

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

I saw the following on the docs page of this crate:

Use the package key to improve import ergonomics (hex instead of hex-conservative).
hex = { package = "hex-conservative", version = "*" }

Feel free to ignore it if you think it is not important.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes even though still draft, yes certainly appreciate any early feedback. And I did miss that docs suggestion, I'll update it!

log = "^0.4"
ureq = { version = "2.5.0", features = ["json"], optional = true }
minreq = { version = "2.10.0", features = ["json-using-serde"], optional = true }
reqwest = { version = "0.11", optional = true, default-features = false, features = ["json"] }

[dev-dependencies]
serde_json = "1.0"
tokio = { version = "1.20.1", features = ["full"] }
electrsd = { version = "0.24.0", features = ["legacy", "esplora_a33e97e1", "bitcoind_22_0"] }
electrum-client = "0.16.0"
electrsd = { version = "0.25.0", features = ["legacy", "esplora_a33e97e1", "bitcoind_22_1"] }
lazy_static = "1.4.0"
# zip versions after 0.6.3 don't work with our MSRV 1.57.0
zip = "=0.6.3"
Expand All @@ -37,7 +35,7 @@ base64ct = "<1.6.0"

[features]
default = ["blocking", "async", "async-https"]
blocking = ["ureq", "ureq/socks-proxy"]
blocking = ["minreq", "minreq/proxy"]
async = ["reqwest", "reqwest/socks"]
async-https = ["async", "reqwest/default-tls"]
async-https-native = ["async", "reqwest/native-tls"]
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ To build with the MSRV you will need to pin dependencies as follows:
```shell
cargo update -p tokio --precise 1.29.1
cargo update -p reqwest --precise 0.11.18
cargo update -p rustls:0.20.9 --precise 0.20.8
cargo update -p rustix --precise 0.38.6
cargo update -p rustls:0.21.7 --precise 0.21.1
cargo update -p rustix --precise 0.38.6
cargo update -p hyper-rustls:0.24.1 --precise 0.24.0
cargo update -p rustls-webpki:0.100.3 --precise 0.100.1
cargo update -p rustls-webpki:0.101.6 --precise 0.101.1
Expand Down
12 changes: 1 addition & 11 deletions src/async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use bitcoin::hashes::{sha256, Hash};
use bitcoin::{
block::Header as BlockHeader, Block, BlockHash, MerkleBlock, Script, Transaction, Txid,
};
use bitcoin_internals::hex::display::DisplayHex;
use hex_conservative::DisplayHex;

#[allow(unused_imports)]
use log::{debug, error, info, trace};
Expand Down Expand Up @@ -132,16 +132,6 @@ impl AsyncClient {
}
}

#[deprecated(
since = "0.2.0",
note = "Deprecated to improve alignment with Esplora API. Users should use `get_block_hash` and `get_header_by_hash` methods directly."
)]
/// Get a [`BlockHeader`] given a particular block height.
pub async fn get_header(&self, block_height: u32) -> Result<BlockHeader, Error> {
let block_hash = self.get_block_hash(block_height).await?;
self.get_header_by_hash(&block_hash).await
}

/// Get a [`BlockHeader`] given a particular block hash.
pub async fn get_header_by_hash(&self, block_hash: &BlockHash) -> Result<BlockHeader, Error> {
let resp = self
Expand Down
Loading