From 9324f7f097ca0df6fb42c6b56f4a0a7727f457c4 Mon Sep 17 00:00:00 2001 From: Aditya Kulkarni <adityapk@gmail.com> Date: Tue, 22 Oct 2019 07:42:43 -0700 Subject: [PATCH] Pin tokio dependencies --- docker/Dockerfile | 8 +++++++- lib/Cargo.toml | 6 +++--- lib/src/lightwallet.rs | 6 +++--- src/main.rs | 1 + 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 9c78c80..abe4b05 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -28,4 +28,10 @@ RUN cp /usr/x86_64-w64-mingw32/lib/crt2.o /usr/local/rustup/toolchains/1.38.0-x8 # For windows cross compilation, use a pre-build binary. Remember to set the # SODIUM_LIB_DIR for windows cross compilation RUN cd /opt && wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.17-mingw.tar.gz && \ - tar xvf libsodium-1.0.17-mingw.tar.gz \ No newline at end of file + tar xvf libsodium-1.0.17-mingw.tar.gz + +# Cargo fetch the dependencies so we don't download them over and over again +RUN cd /tmp && git clone https://github.com/adityapk00/zecwallet-light-cli.git && \ + cd zecwallet-light-cli && \ + cargo fetch && \ + cd /tmp && rm -rf zecwallet-light-cli diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 45ed1d8..459ff9e 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2018" [dependencies] -tower-grpc = { git = "https://github.com/tower-rs/tower-grpc" } +tower-grpc = "0.1.1" futures = "0.1" bytes = "0.4" base58 = "0.1.0" @@ -14,7 +14,7 @@ dirs = "2.0.2" http = "0.1" prost = "0.5" tokio = "0.1" -tower-request-modifier = { git = "https://github.com/tower-rs/tower-http" } +tower-request-modifier = "0.1.0" tower-util = "0.1" hex = "0.3" protobuf = "2" @@ -31,7 +31,7 @@ tokio-rustls = "0.10.0-alpha.3" rustls = { version = "0.15.2", features = ["dangerous_configuration"] } webpki = "0.19.1" webpki-roots = "0.16.0" -tower-h2 = { git = "https://github.com/tower-rs/tower-h2" } +tower-h2 = { git = "https://github.com/tower-rs/tower-h2", rev="0865040d699697bbaf1c3b77b3f256b72f98cdf4" } rust-embed = { version = "5.1.0", features = ["debug-embed"] } rand = "0.7.2" sodiumoxide = "0.2.5" diff --git a/lib/src/lightwallet.rs b/lib/src/lightwallet.rs index 7a37c1b..6cf8c2b 100644 --- a/lib/src/lightwallet.rs +++ b/lib/src/lightwallet.rs @@ -1399,9 +1399,9 @@ impl LightWallet { // Create a map from address -> sk for all taddrs, so we can spend from the // right address - let address_to_sk: HashMap<_, _> = self.tkeys.read().unwrap().iter().map(|sk| - (self.address_from_sk(&sk), sk.clone()) - ).collect(); + let address_to_sk = self.tkeys.read().unwrap().iter() + .map(|sk| (self.address_from_sk(&sk), sk.clone())) + .collect::<HashMap<_,_>>(); // Add all tinputs tinputs.iter() diff --git a/src/main.rs b/src/main.rs index 125f20a..3222923 100644 --- a/src/main.rs +++ b/src/main.rs @@ -317,6 +317,7 @@ fn attempt_recover_seed() { consensus_branch_id: "000000".to_string(), anchor_offset: 0, no_cert_verification: false, + data_dir: None, }; let mut reader = BufReader::new(File::open(config.get_wallet_path()).unwrap());