Merge bitcoindevkit/rust-electrum-client#183: Default to ring if multiple rustls features are set
80bf744a70test: don't assert the value returned by `relay_fee` (valued mammal)0e28021b3eCheck in CI that we compile if all `rustls` features are set (Elias Rohrer)980fa4afd6Default to `ring` if multiple `rustls` features are set (Elias Rohrer) Pull request description: Fixes #181 We default to use `ring` if multiple features are set, ensuring the features are additive. To that end, we also add a check to CI that asserts we succeed to build with both features set. Would be cool to get a patch release for this, as it's currently breaking our docs.rs builds in `lightning-liquidity`. ACKs for top commit: ValuedMammal: ACK80bf744a70. oleonardolima: cACK80bf744a70Tree-SHA512: 0b1bacb0f3a57fd8c666e1ece14b9a733f9d5dfdec7efd6461b400d58ef0e302c286597531381e417b5fdf1b97659ed36266d2cf89f8a0c4cab5e4d9b3fdeed7
This commit is contained in:
commit
b185259561
1
.github/workflows/cont_integration.yml
vendored
1
.github/workflows/cont_integration.yml
vendored
@ -41,6 +41,7 @@ jobs:
|
||||
- run: cargo check --verbose --no-default-features --features=proxy,use-openssl
|
||||
- run: cargo check --verbose --no-default-features --features=proxy,use-rustls
|
||||
- run: cargo check --verbose --no-default-features --features=proxy,use-rustls-ring
|
||||
- run: cargo check --verbose --no-default-features --features=proxy,use-rustls,use-rustls-ring
|
||||
|
||||
fmt:
|
||||
name: Rust fmt
|
||||
|
||||
@ -408,7 +408,7 @@ impl RawClient<ElectrumSslStream> {
|
||||
|
||||
if rustls::crypto::CryptoProvider::get_default().is_none() {
|
||||
// We install a crypto provider depending on the set feature.
|
||||
#[cfg(feature = "use-rustls")]
|
||||
#[cfg(all(feature = "use-rustls", not(feature = "use-rustls-ring")))]
|
||||
rustls::crypto::CryptoProvider::install_default(
|
||||
rustls::crypto::aws_lc_rs::default_provider(),
|
||||
)
|
||||
@ -449,7 +449,7 @@ impl RawClient<ElectrumSslStream> {
|
||||
builder
|
||||
.dangerous()
|
||||
.with_custom_certificate_verifier(std::sync::Arc::new(
|
||||
#[cfg(feature = "use-rustls")]
|
||||
#[cfg(all(feature = "use-rustls", not(feature = "use-rustls-ring")))]
|
||||
danger::NoCertificateVerification::new(rustls::crypto::aws_lc_rs::default_provider()),
|
||||
#[cfg(feature = "use-rustls-ring")]
|
||||
danger::NoCertificateVerification::new(rustls::crypto::ring::default_provider()),
|
||||
@ -1249,7 +1249,7 @@ mod test {
|
||||
let client = RawClient::new(get_test_server(), None).unwrap();
|
||||
|
||||
let resp = client.relay_fee().unwrap();
|
||||
assert_eq!(resp, 0.00001);
|
||||
assert!(resp > 0.0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user