File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 11[package ]
22
33name = " grin_secp256k1zkp"
4- version = " 0.7.8 "
4+ version = " 0.7.9 "
55authors = [ " Grin Developers <mimblewimble@lists.launchpad.net>" ,
6- " Dawid Ciężarkiewicz <dpc@ucore.info>" ,
6+ " Dawid Ciężarkiewicz <dpc@ucore.info>" ,
77 " Andrew Poelstra <apoelstra@wpsoftware.net>" ]
88license = " CC0-1.0"
99homepage = " https://grin.mw"
Original file line number Diff line number Diff line change @@ -98,9 +98,9 @@ impl Commitment {
9898 /// Creates from a pubkey
9999 pub fn from_pubkey ( secp : & Secp256k1 , pk : & key:: PublicKey ) -> Result < Self , Error > {
100100 unsafe {
101- let mut commit = Self :: blank ( ) ;
102- if ffi:: secp256k1_pubkey_to_pedersen_commitment ( secp. ctx , commit . as_mut_ptr ( ) , & pk. 0 ) == 1 {
103- Ok ( commit )
101+ let mut commit_i = [ 0 ; constants :: PEDERSEN_COMMITMENT_SIZE_INTERNAL ] ;
102+ if ffi:: secp256k1_pubkey_to_pedersen_commitment ( secp. ctx , commit_i . as_mut_ptr ( ) , & pk. 0 as * const _ ) == 1 {
103+ Ok ( secp . commit_ser ( commit_i ) ? )
104104 } else {
105105 Err ( InvalidCommit )
106106 }
You can’t perform that action at this time.
0 commit comments