Use write_all to write the whole pk in cli_setup()
This commit is contained in:
parent
2019803d20
commit
2c4a0c59f8
1 changed files with 2 additions and 2 deletions
|
@ -152,7 +152,7 @@ fn cli_setup<T: Field, S: Scheme<T>, B: Backend<T, S>>(
|
||||||
let mut vk_file = File::create(vk_path)
|
let mut vk_file = File::create(vk_path)
|
||||||
.map_err(|why| format!("couldn't create {}: {}", vk_path.display(), why))?;
|
.map_err(|why| format!("couldn't create {}: {}", vk_path.display(), why))?;
|
||||||
vk_file
|
vk_file
|
||||||
.write(
|
.write_all(
|
||||||
serde_json::to_string_pretty(&keypair.vk)
|
serde_json::to_string_pretty(&keypair.vk)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.as_bytes(),
|
.as_bytes(),
|
||||||
|
@ -163,7 +163,7 @@ fn cli_setup<T: Field, S: Scheme<T>, B: Backend<T, S>>(
|
||||||
let mut pk_file = File::create(pk_path)
|
let mut pk_file = File::create(pk_path)
|
||||||
.map_err(|why| format!("couldn't create {}: {}", pk_path.display(), why))?;
|
.map_err(|why| format!("couldn't create {}: {}", pk_path.display(), why))?;
|
||||||
pk_file
|
pk_file
|
||||||
.write(keypair.pk.as_ref())
|
.write_all(keypair.pk.as_ref())
|
||||||
.map_err(|why| format!("couldn't write to {}: {}", pk_path.display(), why))?;
|
.map_err(|why| format!("couldn't write to {}: {}", pk_path.display(), why))?;
|
||||||
|
|
||||||
println!("Setup completed.");
|
println!("Setup completed.");
|
||||||
|
|
Loading…
Reference in a new issue