Skip to content

Commit

Permalink
Commit to pubkey fix (mimblewimble#68)
Browse files Browse the repository at this point in the history
* commit_to_pubkey fix

* version bump for next release

* retrigger build
  • Loading branch information
yeastplume authored and suemto committed Oct 28, 2020
1 parent e346d70 commit 6769912
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[package]

name = "grin_secp256k1zkp"
version = "0.7.8"
version = "0.7.9"
authors = [ "Grin Developers <[email protected]>",
"Dawid Ciężarkiewicz <[email protected]>",
"Dawid Ciężarkiewicz <[email protected]>",
"Andrew Poelstra <[email protected]>" ]
license = "CC0-1.0"
homepage = "https://grin.mw"
Expand Down
6 changes: 3 additions & 3 deletions src/pedersen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ impl Commitment {
/// Creates from a pubkey
pub fn from_pubkey(secp: &Secp256k1, pk: &key::PublicKey) -> Result<Self, Error> {
unsafe {
let mut commit = Self::blank();
if ffi::secp256k1_pubkey_to_pedersen_commitment(secp.ctx, commit.as_mut_ptr(), &pk.0) == 1 {
Ok(commit)
let mut commit_i = [0; constants::PEDERSEN_COMMITMENT_SIZE_INTERNAL];
if ffi::secp256k1_pubkey_to_pedersen_commitment(secp.ctx, commit_i.as_mut_ptr(), &pk.0 as *const _) == 1 {
Ok(secp.commit_ser(commit_i)?)
} else {
Err(InvalidCommit)
}
Expand Down

0 comments on commit 6769912

Please sign in to comment.