zcash_proofs: Remove obsolete examples.
Since we now use the bundled prover everywhere, we no longer need utilities to download Zcash parameters, which was the only purpose that these examples were serving.
This commit is contained in:
parent
ea7c608f45
commit
c0a0ef1653
|
@ -53,17 +53,5 @@ multicore = ["bellman/multicore", "zcash_primitives/multicore"]
|
|||
[lib]
|
||||
bench = false
|
||||
|
||||
[[example]]
|
||||
name = "get-params-path"
|
||||
required-features = ["directories"]
|
||||
|
||||
[[example]]
|
||||
name = "download-params"
|
||||
required-features = ["download-params"]
|
||||
|
||||
[[example]]
|
||||
name = "download-sprout-and-sapling-params"
|
||||
required-features = ["download-params"]
|
||||
|
||||
[badges]
|
||||
maintenance = { status = "actively-developed" }
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
fn main() -> Result<(), minreq::Error> {
|
||||
#[allow(deprecated)]
|
||||
zcash_proofs::download_parameters()
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
fn main() -> Result<(), minreq::Error> {
|
||||
const DOWNLOAD_TIMEOUT_SECONDS: u64 = 3600;
|
||||
|
||||
#[allow(unused_mut, unused_assignments)]
|
||||
let mut params_folder =
|
||||
zcash_proofs::default_params_folder().expect("unexpected missing HOME env var");
|
||||
|
||||
// Always do a download to /tmp, if compiled with `RUSTFLAGS="--cfg always_download"`
|
||||
#[cfg(always_download)]
|
||||
{
|
||||
std::env::set_var("HOME", "/tmp");
|
||||
params_folder =
|
||||
zcash_proofs::default_params_folder().expect("unexpected missing HOME env var");
|
||||
|
||||
println!("removing temporary parameters folder: {:?}", params_folder);
|
||||
let _ = std::fs::remove_dir_all(¶ms_folder);
|
||||
}
|
||||
|
||||
println!("downloading sapling parameters to: {:?}", params_folder);
|
||||
zcash_proofs::download_sapling_parameters(Some(DOWNLOAD_TIMEOUT_SECONDS))?;
|
||||
|
||||
println!("downloading sprout parameters to: {:?}", params_folder);
|
||||
zcash_proofs::download_sprout_parameters(Some(DOWNLOAD_TIMEOUT_SECONDS))?;
|
||||
|
||||
Ok(())
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
fn main() {
|
||||
if let Some(path) = zcash_proofs::default_params_folder() {
|
||||
if let Some(path) = path.to_str() {
|
||||
println!("{}", path);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue