MCPcopy Create free account
hub / github.com/cowprotocol/services / test_https

Function test_https

crates/ethrpc/src/lib.rs:136–150  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

134
135 #[tokio::test]
136 async fn test_https() {
137 let provider = Web3::new_from_url("https://rpc.mevblocker.io");
138 let response = provider.provider.get_block(BlockId::latest()).await;
139
140 if let Err(err) = response {
141 // only fail the CI if we are sure the error is due to missing
142 // `https` support
143 if err.to_string().contains("scheme is not http") {
144 eprintln!("{err:?}");
145 panic!("https support is not enabled");
146 } else {
147 eprintln!("mevblocker error unrelated to https support: {err:?}");
148 }
149 }
150 }
151}

Callers

nothing calls this directly

Calls 1

containsMethod · 0.45

Tested by

no test coverage detected