From ead216b6ae08f702d2add90951562fb073f32c71 Mon Sep 17 00:00:00 2001 From: Aditya Kulkarni Date: Tue, 1 Oct 2019 18:18:59 -0700 Subject: [PATCH] Formatting --- src/lightclient.rs | 10 +++++----- src/lightwallet/mod.rs | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lightclient.rs b/src/lightclient.rs index c4f012c..198b33b 100644 --- a/src/lightclient.rs +++ b/src/lightclient.rs @@ -3,46 +3,46 @@ use crate::lightwallet::LightWallet; use log::{info, warn, error}; use std::sync::{Arc}; +use std::sync::atomic::{AtomicU64, AtomicI32, AtomicUsize, Ordering}; use std::net::ToSocketAddrs; use std::path::Path; use std::fs::File; use std::io; use std::io::prelude::*; use std::io::{BufReader, BufWriter, Error, ErrorKind}; - -use std::sync::atomic::{AtomicU64, AtomicI32, AtomicUsize, Ordering}; +use std::net::SocketAddr; use json::{object, JsonValue}; use futures::{Future}; use futures::stream::Stream; +use tower_h2; use tower_util::MakeService; use tower_grpc::Request; use tokio_rustls::client::TlsStream; use tokio_rustls::{rustls::ClientConfig, TlsConnector}; -use std::net::SocketAddr; use tokio::executor::DefaultExecutor; use tokio::net::tcp::TcpStream; -use tower_h2; use zcash_primitives::transaction::{TxId, Transaction}; use zcash_client_backend::{ constants::testnet, constants::mainnet, constants::regtest, encoding::encode_payment_address, }; - use crate::grpc_client::{ChainSpec, BlockId, BlockRange, RawTransaction, TransparentAddressBlockFilter, TxFilter, Empty, LightdInfo}; use crate::grpc_client::client::CompactTxStreamer; use crate::SaplingParams; + pub const DEFAULT_SERVER: &str = "https://lightd-main.zecwallet.co:443"; pub const WALLET_NAME: &str = "zecwallet-light-wallet.dat"; pub const LOGFILE_NAME: &str = "zecwallet-light-wallet.debug.log"; + /// A Secure (https) grpc destination. struct Dst { addr: SocketAddr, diff --git a/src/lightwallet/mod.rs b/src/lightwallet/mod.rs index f29ce06..86a81f3 100644 --- a/src/lightwallet/mod.rs +++ b/src/lightwallet/mod.rs @@ -13,6 +13,7 @@ use bip39::{Mnemonic, Language}; use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt}; use pairing::bls12_381::{Bls12}; +use sha2::{Sha256, Digest}; use zcash_client_backend::{ encoding::{encode_payment_address, encode_extended_spending_key}, @@ -35,15 +36,14 @@ use zcash_primitives::{ primitives::{PaymentAddress}, }; -use data::{BlockData, WalletTx, Utxo, SaplingNoteData, SpendableNote, OutgoingTxMetadata}; use crate::{address, prover, LightClientConfig, utils}; -use sha2::{Sha256, Digest}; pub mod data; pub mod extended_key; +use data::{BlockData, WalletTx, Utxo, SaplingNoteData, SpendableNote, OutgoingTxMetadata}; use extended_key::{KeyIndex, ExtendedPrivKey}; pub const MAX_REORG: usize = 100;