Update librustzcash dependencies

This commit is contained in:
Hanh 2021-11-17 11:40:05 +08:00
parent 6c5426dc4b
commit 1368ef704e
2 changed files with 27 additions and 19 deletions

View File

@ -67,16 +67,16 @@ blake2b_simd = "0.5.11"
[dependencies.zcash_client_backend]
git = "https://github.com/hhanh00/librustzcash.git"
rev = "1518b145f8ee67e144fa8337c7dfd4c8cff899c9"
rev = "f2d098abafd10e3744d23a28abe48ced19050f05"
[dependencies.zcash_primitives]
git = "https://github.com/hhanh00/librustzcash.git"
rev = "1518b145f8ee67e144fa8337c7dfd4c8cff899c9"
rev = "f2d098abafd10e3744d23a28abe48ced19050f05"
features = [ "transparent-inputs" ]
[dependencies.zcash_proofs]
git = "https://github.com/hhanh00/librustzcash.git"
rev = "1518b145f8ee67e144fa8337c7dfd4c8cff899c9"
rev = "f2d098abafd10e3744d23a28abe48ced19050f05"
[dependencies.zcash_params]
path = "../zcash-params"

View File

@ -1,3 +1,4 @@
use std::str::FromStr;
use bip39::{Language, Mnemonic};
use rand::rngs::OsRng;
use rand::{thread_rng, RngCore};
@ -6,6 +7,7 @@ use sync::{
pedersen_hash, print_witness2, ChainError, DbAdapter, RecipientMemo, Wallet, Witness, LWD_URL,
};
use zcash_client_backend::data_api::wallet::ANCHOR_OFFSET;
use zcash_primitives::memo::Memo;
use zcash_primitives::merkle_tree::Hashable;
use zcash_primitives::sapling::Node;
@ -22,7 +24,7 @@ async fn test() -> anyhow::Result<()> {
dotenv::dotenv().unwrap();
env_logger::init();
let seed = dotenv::var("SEED3").unwrap();
let seed = dotenv::var("SEED").unwrap();
// let seed2 = dotenv::var("SEED2").unwrap();
// let ivk = dotenv::var("IVK").unwrap();
let address = dotenv::var("ADDRESS").unwrap();
@ -42,21 +44,27 @@ async fn test() -> anyhow::Result<()> {
panic!("{}", err);
}
}
// let tx_id = wallet
// .send_payment(
// 1,
// &address,
// 50000,
// "test memo",
// 0,
// 2,
// move |progress| {
// println!("{}", progress.cur());
// },
// )
// .await
// .unwrap();
// println!("TXID = {}", tx_id);
let last_height = wallet.get_latest_height().await.unwrap();
let tx_id = wallet
.build_sign_send_multi_payment(
1,
last_height,
&[RecipientMemo {
address,
amount: 50000,
memo: Memo::from_str("test memo").unwrap(),
max_amount_per_note: 0,
}],
false,
2,
move |progress| {
println!("{}", progress.cur());
},
)
.await
.unwrap();
println!("TXID = {}", tx_id);
// let last_height = wallet.get_latest_height().await.unwrap();
// let tx = wallet