Skip to content

Commit ff2e24a

Browse files
authoredMay 12, 2020
Updated directory_client reqwest to 0.10 (#226)
* Updated directory_client reqwest to 0.10 * Using consistent syntax
1 parent f47b7cf commit ff2e24a

25 files changed

+756
-477
lines changed
 

‎Cargo.lock

+179-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎clients/desktop/src/client/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use gateway_client::{GatewayClient, SphinxPacketReceiver, SphinxPacketSender};
2929
use gateway_requests::auth_token::AuthToken;
3030
use log::*;
3131
use nymsphinx::chunking::split_and_prepare_payloads;
32-
use nymsphinx::{Destination, DestinationAddressBytes};
32+
use nymsphinx::DestinationAddressBytes;
3333
use received_buffer::{ReceivedBufferMessage, ReconstructedMessagesReceiver};
3434

3535
use tokio::runtime::Runtime;

‎clients/desktop/src/client/topology_control.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ impl<T: 'static + NymTopology> TopologyRefresher<T> {
157157
}
158158

159159
async fn get_current_compatible_topology(&self) -> T {
160-
let full_topology = T::new(self.directory_server.clone());
160+
// note: this call makes it neccessary that `T::new()`does *not* have 'static lifetime
161+
let full_topology = T::new(self.directory_server.clone()).await;
161162
// just filter by version and assume the validators will remove all bad behaving
162163
// nodes with the staking
163164
full_topology.filter_system_version(built_info::PKG_VERSION)

‎clients/desktop/src/commands/init.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ async fn choose_gateway(
8989
our_address: DestinationAddressBytes,
9090
) -> (String, AuthToken) {
9191
// TODO: once we change to graph topology this here will need to be updated!
92-
let topology = Topology::new(directory_server.clone());
92+
let topology = Topology::new(directory_server.clone()).await;
9393
let version_filtered_topology = topology.filter_system_version(built_info::PKG_VERSION);
9494
// don't care about health of the networks as mixes can go up and down any time,
9595
// but DO care about gateways

‎common/client-libs/directory-client/Cargo.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ edition = "2018"
88

99
[dependencies]
1010
log = "0.4"
11+
futures = "0.3"
1112
pretty_env_logger = "0.3"
12-
reqwest = "0.9.22"
13+
reqwest = { version = "0.10", features = ["json"] }
1314
serde = { version = "1.0.104", features = ["derive"] }
1415

1516
## internal
1617
topology = {path = "../../topology"}
1718

1819
[dev-dependencies]
1920
mockito = "0.23.0"
21+
tokio = { version = "0.2", features = ["macros"] }

0 commit comments

Comments
 (0)
Please sign in to comment.