Skip to content

Commit

Permalink
refactor(blocking): replace ureq with minreq
Browse files Browse the repository at this point in the history
  • Loading branch information
notmandatory authored and tnull committed Feb 29, 2024
1 parent e5fb3a3 commit df9c694
Show file tree
Hide file tree
Showing 6 changed files with 215 additions and 313 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/cont_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ jobs:
features:
- default
- blocking
- blocking-https
- blocking-https-rustls
- blocking-https-native
- blocking-https-bundled
- async
- async-https
- async-https-native
Expand Down
8 changes: 6 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ serde = { version = "1.0", features = ["derive"] }
bitcoin = { version = "0.31.0", features = ["serde", "std"], default-features = false }
hex = { package = "hex-conservative", version = "*" }
log = "^0.4"
ureq = { version = "2.5.0", features = ["json"], optional = true }
minreq = { version = "2.11.0", features = ["json-using-serde"], optional = true }
reqwest = { version = "0.11", optional = true, default-features = false, features = ["json"] }

[dev-dependencies]
Expand All @@ -32,7 +32,11 @@ lazy_static = "1.4.0"

[features]
default = ["blocking", "async", "async-https"]
blocking = ["ureq", "ureq/socks-proxy"]
blocking = ["minreq", "minreq/proxy"]
blocking-https = ["blocking", "minreq/https"]
blocking-https-rustls = ["blocking", "minreq/https-rustls"]
blocking-https-native = ["blocking", "minreq/https-native"]
blocking-https-bundled = ["blocking", "minreq/https-bundled"]
async = ["reqwest", "reqwest/socks"]
async-https = ["async", "reqwest/default-tls"]
async-https-native = ["async", "reqwest/native-tls"]
Expand Down
4 changes: 3 additions & 1 deletion src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
pub use bitcoin::consensus::{deserialize, serialize};
pub use bitcoin::hex::FromHex;
pub use bitcoin::{transaction, Amount, BlockHash, OutPoint, ScriptBuf, Transaction, TxIn, TxOut, Txid, Witness};
pub use bitcoin::{
transaction, Amount, BlockHash, OutPoint, ScriptBuf, Transaction, TxIn, TxOut, Txid, Witness,
};

use serde::Deserialize;

Expand Down
2 changes: 1 addition & 1 deletion src/async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ use std::collections::HashMap;
use std::str::FromStr;

use bitcoin::consensus::{deserialize, serialize};
use bitcoin::hex::{DisplayHex, FromHex};
use bitcoin::hashes::{sha256, Hash};
use bitcoin::hex::{DisplayHex, FromHex};
use bitcoin::{
block::Header as BlockHeader, Block, BlockHash, MerkleBlock, Script, Transaction, Txid,
};
Expand Down
Loading

0 comments on commit df9c694

Please sign in to comment.