From d171c0b0236c24c665ff12111ab4d43e642ea6be Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 14 Jan 2017 17:57:04 +0200 Subject: [PATCH] test --- iguana/dpow/dpow_network.c | 6 +++--- iguana/iguana_secp.c | 9 +++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index ec7f917f2..723d642db 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -63,9 +63,9 @@ int32_t signed_nn_recv(void **freeptrp,void *ctx,uint8_t notaries[64][33],int32_ *freeptrp = 0; if ( (recvbytes= nn_recv(sock,&sigpacket,NN_MSG,0)) > 0 ) { - for (i=0; i sizeof(*sigpacket) && sigpacket->packetlen == recvbytes-sizeof(*sigpacket) ) { diff --git a/iguana/iguana_secp.c b/iguana/iguana_secp.c index 1cdf6e294..094384a63 100755 --- a/iguana/iguana_secp.c +++ b/iguana/iguana_secp.c @@ -131,8 +131,13 @@ int32_t bitcoin_sign(void *ctx,char *symbol,uint8_t *sig,bits256 txhash2,bits256 { sig[0] = 27 + recid + (fCompressed != 0 ? 4 : 0); retval = 64 + 1; - } - else printf("secpub mismatch\n"); + size_t i,plen = 33; uint8_t pubkey[33]; + secp256k1_ec_pubkey_serialize(ctx,pubkey,&plen,&CHECKPUB,SECP256K1_EC_COMPRESSED); + for (i=0; i<33; i++) + printf("%02x",pubkey[i]); + printf(" bitcoin_sign's pubkey\n"); + + } else printf("secpub mismatch\n"); } else printf("pubkey create error\n"); } else printf("recover error\n"); } else printf("secp256k1_ecdsa_sign_recoverable error\n");