From 5f233ef9896789d0bac4072b5bdc96720f0f882e Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Sat, 21 Apr 2018 17:46:08 -0600 Subject: [PATCH] Initialize Jubjub parameters up front --- src/rustzcash.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rustzcash.rs b/src/rustzcash.rs index 649a021..e65711a 100644 --- a/src/rustzcash.rs +++ b/src/rustzcash.rs @@ -34,6 +34,9 @@ pub extern "system" fn librustzcash_init_zksnark_params( output_path: *const c_char, sprout_path: *const c_char, ) { + // Initialize jubjub parameters here + lazy_static::initialize(&JUBJUB); + // These should be valid CStr's, but the decoding may fail on Windows // so we may need to use OSStr or something. let spend_path = unsafe { CStr::from_ptr(spend_path) }