Skip to content

Commit df9c694

Browse files
notmandatorytnull
authored andcommitted
refactor(blocking): replace ureq with minreq
1 parent e5fb3a3 commit df9c694

File tree

6 files changed

+215
-313
lines changed

6 files changed

+215
-313
lines changed

.github/workflows/cont_integration.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ jobs:
2222
features:
2323
- default
2424
- blocking
25+
- blocking-https
26+
- blocking-https-rustls
27+
- blocking-https-native
28+
- blocking-https-bundled
2529
- async
2630
- async-https
2731
- async-https-native

Cargo.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ serde = { version = "1.0", features = ["derive"] }
2121
bitcoin = { version = "0.31.0", features = ["serde", "std"], default-features = false }
2222
hex = { package = "hex-conservative", version = "*" }
2323
log = "^0.4"
24-
ureq = { version = "2.5.0", features = ["json"], optional = true }
24+
minreq = { version = "2.11.0", features = ["json-using-serde"], optional = true }
2525
reqwest = { version = "0.11", optional = true, default-features = false, features = ["json"] }
2626

2727
[dev-dependencies]
@@ -32,7 +32,11 @@ lazy_static = "1.4.0"
3232

3333
[features]
3434
default = ["blocking", "async", "async-https"]
35-
blocking = ["ureq", "ureq/socks-proxy"]
35+
blocking = ["minreq", "minreq/proxy"]
36+
blocking-https = ["blocking", "minreq/https"]
37+
blocking-https-rustls = ["blocking", "minreq/https-rustls"]
38+
blocking-https-native = ["blocking", "minreq/https-native"]
39+
blocking-https-bundled = ["blocking", "minreq/https-bundled"]
3640
async = ["reqwest", "reqwest/socks"]
3741
async-https = ["async", "reqwest/default-tls"]
3842
async-https-native = ["async", "reqwest/native-tls"]

src/api.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
55
pub use bitcoin::consensus::{deserialize, serialize};
66
pub use bitcoin::hex::FromHex;
7-
pub use bitcoin::{transaction, Amount, BlockHash, OutPoint, ScriptBuf, Transaction, TxIn, TxOut, Txid, Witness};
7+
pub use bitcoin::{
8+
transaction, Amount, BlockHash, OutPoint, ScriptBuf, Transaction, TxIn, TxOut, Txid, Witness,
9+
};
810

911
use serde::Deserialize;
1012

src/async.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ use std::collections::HashMap;
1515
use std::str::FromStr;
1616

1717
use bitcoin::consensus::{deserialize, serialize};
18-
use bitcoin::hex::{DisplayHex, FromHex};
1918
use bitcoin::hashes::{sha256, Hash};
19+
use bitcoin::hex::{DisplayHex, FromHex};
2020
use bitcoin::{
2121
block::Header as BlockHeader, Block, BlockHash, MerkleBlock, Script, Transaction, Txid,
2222
};

0 commit comments

Comments
 (0)