From 932a5366937b9becb882b962c0a6f1e4267c93a9 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 13 Dec 2017 22:40:55 +0400 Subject: [PATCH] Test --- iguana/exchanges/LP_secp.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/iguana/exchanges/LP_secp.c b/iguana/exchanges/LP_secp.c index 800ee9fa4..0cdda8db6 100644 --- a/iguana/exchanges/LP_secp.c +++ b/iguana/exchanges/LP_secp.c @@ -86,7 +86,7 @@ bits256 bitcoin_pub256(void *ctx,bits256 *privkeyp,uint8_t odd_even) int32_t bitcoin_sign(void *ctx,char *symbol,uint8_t *sig,bits256 txhash2,bits256 privkey,int32_t recoverflag) { int32_t fCompressed = 1; - secp256k1_ecdsa_signature SIG; void *funcp; secp256k1_ecdsa_recoverable_signature rSIG; bits256 extra_entropy,seed; uint8_t *entropy; int32_t recid,val,retval = -1; size_t siglen = 72; secp256k1_pubkey SECPUB,CHECKPUB; + secp256k1_ecdsa_signature SIG; void *funcp; secp256k1_ecdsa_recoverable_signature rSIG; bits256 extra_entropy,seed; uint8_t *entropy; int32_t recid,retval = -1; size_t siglen = 72; secp256k1_pubkey SECPUB,CHECKPUB; seed = rand256(0); extra_entropy = rand256(0); SECP_ENSURE_CTX @@ -98,17 +98,9 @@ int32_t bitcoin_sign(void *ctx,char *symbol,uint8_t *sig,bits256 txhash2,bits256 return(-1); } if ( strcmp(symbol,"BCH") == 0 ) - { - funcp = 0; entropy = 0; - val = 1; - } - else - { - entropy = extra_entropy.bytes; - val = secp256k1_context_randomize(ctx,seed.bytes); - } - if ( val != 0 ) + else entropy = extra_entropy.bytes; + if ( secp256k1_context_randomize(ctx,seed.bytes) != 0 ) { if ( recoverflag != 0 ) {