From 913d75219b702a757448c1239593cf13db6c7dea Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 7 Feb 2018 11:03:03 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_etomic.c | 1 + iguana/exchanges/LP_privkey.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/iguana/exchanges/LP_etomic.c b/iguana/exchanges/LP_etomic.c index 8ecb5cc35..3d16b19eb 100644 --- a/iguana/exchanges/LP_etomic.c +++ b/iguana/exchanges/LP_etomic.c @@ -78,6 +78,7 @@ int32_t LP_etomic_priv2pub(uint8_t *pub64,bits256 privkey) bits256_str(str,privkey); if ( (pubstr= getPubKeyFromPriv(str)) != 0 ) { + printf("priv2pub got %s\n",pubstr); if ( strlen(pubstr) == 128 && pubstr[0] == '0' && pubstr[1] == 'x' ) { decode_hex(pub33,64,pubstr+2); diff --git a/iguana/exchanges/LP_privkey.c b/iguana/exchanges/LP_privkey.c index 95d9eb079..eb1668f10 100644 --- a/iguana/exchanges/LP_privkey.c +++ b/iguana/exchanges/LP_privkey.c @@ -295,16 +295,16 @@ bits256 LP_privkeycalc(void *ctx,uint8_t *pubkey33,bits256 *pubkeyp,struct iguan } bitcoin_priv2pub(ctx,coin->symbol,coin->pubkey33,coin->smartaddr,privkey,coin->taddr,coin->pubtype); { - uint8_t check33[33]; char checkaddr[64]; + uint8_t check64[64]; char checkaddr[64]; if ( LP_etomic_priv2pub(check33,privkey) > 0 ) { - if ( memcmp(check33,coin->pubkey33,33) == 0 ) + if ( memcmp(check64,coin->pubkey33+1,32) == 0 ) { printf("pubkey33 matches!\n"); if ( LP_etomic_pub2addr(checkaddr,check33) > 0 ) printf("addr is (%s)\n",checkaddr); else printf("error getting addr\n"); - } else printf("pubkey 33 mismatch\n"); + } else printf("pubkey 64 mismatch\n"); } else printf("error creating pubkey\n"); } if ( coin->counter == 0 )