mirror of
https://github.com/Qortal/piratewallet-light-cli.git
synced 2025-07-30 20:01:26 +00:00
Formatting
This commit is contained in:
@@ -3,46 +3,46 @@ use crate::lightwallet::LightWallet;
|
|||||||
use log::{info, warn, error};
|
use log::{info, warn, error};
|
||||||
|
|
||||||
use std::sync::{Arc};
|
use std::sync::{Arc};
|
||||||
|
use std::sync::atomic::{AtomicU64, AtomicI32, AtomicUsize, Ordering};
|
||||||
use std::net::ToSocketAddrs;
|
use std::net::ToSocketAddrs;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io;
|
use std::io;
|
||||||
use std::io::prelude::*;
|
use std::io::prelude::*;
|
||||||
use std::io::{BufReader, BufWriter, Error, ErrorKind};
|
use std::io::{BufReader, BufWriter, Error, ErrorKind};
|
||||||
|
use std::net::SocketAddr;
|
||||||
use std::sync::atomic::{AtomicU64, AtomicI32, AtomicUsize, Ordering};
|
|
||||||
|
|
||||||
use json::{object, JsonValue};
|
use json::{object, JsonValue};
|
||||||
|
|
||||||
use futures::{Future};
|
use futures::{Future};
|
||||||
use futures::stream::Stream;
|
use futures::stream::Stream;
|
||||||
|
|
||||||
|
use tower_h2;
|
||||||
use tower_util::MakeService;
|
use tower_util::MakeService;
|
||||||
use tower_grpc::Request;
|
use tower_grpc::Request;
|
||||||
|
|
||||||
use tokio_rustls::client::TlsStream;
|
use tokio_rustls::client::TlsStream;
|
||||||
use tokio_rustls::{rustls::ClientConfig, TlsConnector};
|
use tokio_rustls::{rustls::ClientConfig, TlsConnector};
|
||||||
use std::net::SocketAddr;
|
|
||||||
|
|
||||||
use tokio::executor::DefaultExecutor;
|
use tokio::executor::DefaultExecutor;
|
||||||
use tokio::net::tcp::TcpStream;
|
use tokio::net::tcp::TcpStream;
|
||||||
use tower_h2;
|
|
||||||
|
|
||||||
use zcash_primitives::transaction::{TxId, Transaction};
|
use zcash_primitives::transaction::{TxId, Transaction};
|
||||||
use zcash_client_backend::{
|
use zcash_client_backend::{
|
||||||
constants::testnet, constants::mainnet, constants::regtest, encoding::encode_payment_address,
|
constants::testnet, constants::mainnet, constants::regtest, encoding::encode_payment_address,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
use crate::grpc_client::{ChainSpec, BlockId, BlockRange, RawTransaction,
|
use crate::grpc_client::{ChainSpec, BlockId, BlockRange, RawTransaction,
|
||||||
TransparentAddressBlockFilter, TxFilter, Empty, LightdInfo};
|
TransparentAddressBlockFilter, TxFilter, Empty, LightdInfo};
|
||||||
use crate::grpc_client::client::CompactTxStreamer;
|
use crate::grpc_client::client::CompactTxStreamer;
|
||||||
use crate::SaplingParams;
|
use crate::SaplingParams;
|
||||||
|
|
||||||
|
|
||||||
pub const DEFAULT_SERVER: &str = "https://lightd-main.zecwallet.co:443";
|
pub const DEFAULT_SERVER: &str = "https://lightd-main.zecwallet.co:443";
|
||||||
pub const WALLET_NAME: &str = "zecwallet-light-wallet.dat";
|
pub const WALLET_NAME: &str = "zecwallet-light-wallet.dat";
|
||||||
pub const LOGFILE_NAME: &str = "zecwallet-light-wallet.debug.log";
|
pub const LOGFILE_NAME: &str = "zecwallet-light-wallet.debug.log";
|
||||||
|
|
||||||
|
|
||||||
/// A Secure (https) grpc destination.
|
/// A Secure (https) grpc destination.
|
||||||
struct Dst {
|
struct Dst {
|
||||||
addr: SocketAddr,
|
addr: SocketAddr,
|
||||||
|
@@ -13,6 +13,7 @@ use bip39::{Mnemonic, Language};
|
|||||||
|
|
||||||
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
|
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
|
||||||
use pairing::bls12_381::{Bls12};
|
use pairing::bls12_381::{Bls12};
|
||||||
|
use sha2::{Sha256, Digest};
|
||||||
|
|
||||||
use zcash_client_backend::{
|
use zcash_client_backend::{
|
||||||
encoding::{encode_payment_address, encode_extended_spending_key},
|
encoding::{encode_payment_address, encode_extended_spending_key},
|
||||||
@@ -35,15 +36,14 @@ use zcash_primitives::{
|
|||||||
primitives::{PaymentAddress},
|
primitives::{PaymentAddress},
|
||||||
};
|
};
|
||||||
|
|
||||||
use data::{BlockData, WalletTx, Utxo, SaplingNoteData, SpendableNote, OutgoingTxMetadata};
|
|
||||||
|
|
||||||
use crate::{address, prover, LightClientConfig, utils};
|
use crate::{address, prover, LightClientConfig, utils};
|
||||||
|
|
||||||
use sha2::{Sha256, Digest};
|
|
||||||
|
|
||||||
pub mod data;
|
pub mod data;
|
||||||
pub mod extended_key;
|
pub mod extended_key;
|
||||||
|
|
||||||
|
use data::{BlockData, WalletTx, Utxo, SaplingNoteData, SpendableNote, OutgoingTxMetadata};
|
||||||
use extended_key::{KeyIndex, ExtendedPrivKey};
|
use extended_key::{KeyIndex, ExtendedPrivKey};
|
||||||
|
|
||||||
pub const MAX_REORG: usize = 100;
|
pub const MAX_REORG: usize = 100;
|
||||||
|
Reference in New Issue
Block a user