Skip to content

Commit

Permalink
Merge #56: ffi: fix signature of whitelist_sign
Browse files Browse the repository at this point in the history
98994ee ffi: fix signature of whitelist_sign (Andrew Poelstra)

Pull request description:

  The signature of whitelist_sign in our FFI bindings did not match the signature in the C libarry.

  Noticed when running local tests on #55. Apparently wasm-pack notices stuff like this now and errors out :)

ACKs for top commit:
  jonasnick:
    utACK 98994ee

Tree-SHA512: a12d5260e2361aa2db06dbecf59f50a15aad1f04b5659dd265cc1bec01197e2b0c5378b903a0b5f6d4a39eeaf45bb69177bc32ef8e6b5733c9e006fcdf7d3c67
  • Loading branch information
apoelstra committed Sep 1, 2022
2 parents e398b07 + 98994ee commit 8b38830
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
4 changes: 1 addition & 3 deletions secp256k1-zkp-sys/src/zkp.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use core::{fmt, hash};
use {types::*, Context, NonceFn, PublicKey, Signature};
use {types::*, Context, PublicKey, Signature};

/// Rangeproof maximum length
pub const RANGEPROOF_MAX_LENGTH: size_t = 5134;
Expand Down Expand Up @@ -374,8 +374,6 @@ extern "C" {
online_seckey: *const c_uchar,
summed_seckey: *const c_uchar,
index: size_t,
noncefp: NonceFn,
noncedata: *mut c_void,
) -> c_int;

#[cfg_attr(
Expand Down
4 changes: 0 additions & 4 deletions src/zkp/whitelist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#[cfg(feature = "std")]
use std::{fmt, str};

use core::ptr;

use ffi::CPtr;
#[cfg(feature = "std")]
use from_hex;
Expand Down Expand Up @@ -94,8 +92,6 @@ impl WhitelistSignature {
online_secret_key.as_ptr(),
summed_secret_key.as_ptr(),
key_index,
None,
ptr::null_mut(),
)
};
if ret != 1 {
Expand Down

0 comments on commit 8b38830

Please sign in to comment.