Make update_sapling_tree use TLS
This commit is contained in:
parent
0abd55f528
commit
3bb6f4fb6a
|
@ -19,6 +19,8 @@ jni = { version = "0.13", default-features = false }
|
|||
log = "0.4"
|
||||
log-panics = "2.0.0"
|
||||
protobuf = { version = "2", optional = true }
|
||||
tls-api = { version = "0.1", optional = true }
|
||||
tls-api-rustls = { version = "0.1", optional = true }
|
||||
|
||||
[dependencies.ff]
|
||||
git = "https://github.com/gmale/librustzcash.git"
|
||||
|
@ -54,7 +56,7 @@ branch = "feature/add-scan-limit"
|
|||
|
||||
[features]
|
||||
mainnet = ["zcash_client_sqlite/mainnet"]
|
||||
updater = ["futures", "grpc", "protobuf"]
|
||||
updater = ["futures", "grpc", "protobuf", "tls-api", "tls-api-rustls"]
|
||||
|
||||
[lib]
|
||||
name = "zcashwalletsdk"
|
||||
|
|
|
@ -4,6 +4,8 @@ extern crate grpc;
|
|||
extern crate hex;
|
||||
extern crate pairing;
|
||||
extern crate protobuf;
|
||||
extern crate tls_api;
|
||||
extern crate tls_api_rustls;
|
||||
extern crate zcash_client_backend;
|
||||
extern crate zcash_primitives;
|
||||
|
||||
|
@ -14,6 +16,7 @@ use ff::{PrimeField, PrimeFieldRepr};
|
|||
use futures::Stream;
|
||||
use grpc::ClientStubExt;
|
||||
use pairing::bls12_381::{Fr, FrRepr};
|
||||
use tls_api::TlsConnector;
|
||||
use zcash_client_backend::proto::compact_formats;
|
||||
use zcash_primitives::{merkle_tree::CommitmentTree, sapling::Node};
|
||||
|
||||
|
@ -44,7 +47,7 @@ fn main() {
|
|||
let mut tree = CommitmentTree::new();
|
||||
|
||||
let client_conf = Default::default();
|
||||
let client = service_grpc::CompactTxStreamerClient::new_plain(
|
||||
let client = service_grpc::CompactTxStreamerClient::new_tls::<tls_api_rustls::TlsConnector>(
|
||||
LIGHTWALLETD_HOST,
|
||||
LIGHTWALLETD_PORT,
|
||||
client_conf,
|
||||
|
|
Loading…
Reference in New Issue