|
|
@ -301,7 +301,7 @@ 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); |
|
|
|
if ( coin->etomic[0] != 0 ) |
|
|
|
{ |
|
|
|
uint8_t check64[64],checktype,checkrmd160[20]; char checkaddr[64],checkaddr2[64]; |
|
|
|
uint8_t check64[64],checktype,checkrmd160[20],rmd160[20]; char checkaddr[64],checkaddr2[64]; |
|
|
|
if ( LP_etomic_priv2pub(check64,privkey) == 0 ) |
|
|
|
{ |
|
|
|
if ( memcmp(check64,coin->pubkey33+1,32) == 0 ) |
|
|
@ -311,7 +311,9 @@ bits256 LP_privkeycalc(void *ctx,uint8_t *pubkey33,bits256 *pubkeyp,struct iguan |
|
|
|
//printf("addr is (%s)\n",checkaddr);
|
|
|
|
strcpy(coin->smartaddr,checkaddr); |
|
|
|
decode_hex(checkrmd160,20,checkaddr+2); |
|
|
|
bitcoin_addr2rmd160(coin->symbol,coin->taddr,&checktype,checkrmd160,checkaddr); |
|
|
|
bitcoin_addr2rmd160(coin->symbol,coin->taddr,&checktype,rmd160,checkaddr); |
|
|
|
if ( memcmp(rmd160,checkrmd160,20) == 0 ) |
|
|
|
printf("rmd160 matches\n"); |
|
|
|
} else printf("error getting addr (%s) != (%s)\n",checkaddr,checkaddr2); |
|
|
|
} else printf("pubkey 64 mismatch\n"); |
|
|
|
} else printf("error creating pubkey\n"); |
|
|
|