Browse Source

Test

etomic
jl777 7 years ago
parent
commit
932a536693
  1. 14
      iguana/exchanges/LP_secp.c

14
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 bitcoin_sign(void *ctx,char *symbol,uint8_t *sig,bits256 txhash2,bits256 privkey,int32_t recoverflag)
{ {
int32_t fCompressed = 1; 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); seed = rand256(0);
extra_entropy = rand256(0); extra_entropy = rand256(0);
SECP_ENSURE_CTX SECP_ENSURE_CTX
@ -98,17 +98,9 @@ int32_t bitcoin_sign(void *ctx,char *symbol,uint8_t *sig,bits256 txhash2,bits256
return(-1); return(-1);
} }
if ( strcmp(symbol,"BCH") == 0 ) if ( strcmp(symbol,"BCH") == 0 )
{
funcp = 0;
entropy = 0; entropy = 0;
val = 1; else entropy = extra_entropy.bytes;
} if ( secp256k1_context_randomize(ctx,seed.bytes) != 0 )
else
{
entropy = extra_entropy.bytes;
val = secp256k1_context_randomize(ctx,seed.bytes);
}
if ( val != 0 )
{ {
if ( recoverflag != 0 ) if ( recoverflag != 0 )
{ {

Loading…
Cancel
Save