|
@ -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); |
|
|
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 ( 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"); |
|
|
printf("pubkey33 matches!\n"); |
|
|
if ( LP_etomic_pub2addr(checkaddr,check33) > 0 ) |
|
|
if ( LP_etomic_pub2addr(checkaddr,check33) > 0 ) |
|
|
printf("addr is (%s)\n",checkaddr); |
|
|
printf("addr is (%s)\n",checkaddr); |
|
|
else printf("error getting addr\n"); |
|
|
else printf("error getting addr\n"); |
|
|
} else printf("pubkey 33 mismatch\n"); |
|
|
} else printf("pubkey 64 mismatch\n"); |
|
|
} else printf("error creating pubkey\n"); |
|
|
} else printf("error creating pubkey\n"); |
|
|
} |
|
|
} |
|
|
if ( coin->counter == 0 ) |
|
|
if ( coin->counter == 0 ) |
|
|