|
|
@ -733,18 +733,19 @@ bits256 LP_privkeycalc(void *ctx,uint8_t *pubkey33,bits256 *pubkeyp,struct iguan |
|
|
|
userpub = curve25519(userpass,curve25519_basepoint9()); |
|
|
|
printf("userpass.(%s)\n",bits256_str(G.USERPASS,userpub)); |
|
|
|
} |
|
|
|
if ( coin->electrum == 0 && coin->userpass[0] != 0 ) |
|
|
|
} |
|
|
|
if ( coin->importedprivkey == 0 && coin->electrum == 0 && coin->userpass[0] != 0 && LP_getheight(coin) > 0 ) |
|
|
|
{ |
|
|
|
LP_listunspent_issue(coin->symbol,coin->smartaddr,0); |
|
|
|
if ( (retjson= LP_importprivkey(coin->symbol,tmpstr,coin->smartaddr,-1)) != 0 ) |
|
|
|
{ |
|
|
|
LP_listunspent_issue(coin->symbol,coin->smartaddr,0); |
|
|
|
if ( (retjson= LP_importprivkey(coin->symbol,tmpstr,coin->smartaddr,-1)) != 0 ) |
|
|
|
if ( jobj(retjson,"error") != 0 ) |
|
|
|
{ |
|
|
|
if ( jobj(retjson,"error") != 0 ) |
|
|
|
{ |
|
|
|
printf("cant importprivkey.%s -> (%s), abort session\n",coin->symbol,jprint(retjson,1)); |
|
|
|
exit(-1); |
|
|
|
} |
|
|
|
} else free_json(retjson); |
|
|
|
} |
|
|
|
printf("cant importprivkey.%s -> (%s), abort session\n",coin->symbol,jprint(retjson,1)); |
|
|
|
exit(-1); |
|
|
|
} |
|
|
|
} else free_json(retjson); |
|
|
|
coin->importedprivkey = (uint32_t)time(NULL); |
|
|
|
} |
|
|
|
vcalc_sha256(0,checkkey.bytes,privkey.bytes,sizeof(privkey)); |
|
|
|
checkkey.bytes[0] &= 248, checkkey.bytes[31] &= 127, checkkey.bytes[31] |= 64; |
|
|
|