Browse Source

Test

etomic
jl777 8 years ago
parent
commit
fd75b32410
  1. 10
      iguana/exchanges/LP_coins.c
  2. 2
      iguana/exchanges/LP_utxos.c

10
iguana/exchanges/LP_coins.c

@ -270,7 +270,7 @@ struct iguana_info *LP_coinfind(char *symbol)
struct iguana_info *LP_coincreate(cJSON *item)
{
struct iguana_info cdata,*coin=0; int32_t isPoS,longestchain = 1000000; uint16_t port; uint64_t txfee; double estimatedrate; uint8_t pubtype,p2shtype,wiftype; char *name,*symbol,*assetname;
struct iguana_info cdata,*coin=0; int32_t isPoS,longestchain = 1000000; uint16_t port; uint64_t txfee; double estimatedrate; uint8_t pubtype,p2shtype,wiftype; char *name=0,*symbol,*assetname=0;
if ( (symbol= jstr(item,"coin")) != 0 && symbol[0] != 0 && strlen(symbol) < 16 && LP_coinfind(symbol) == 0 && (port= juint(item,"rpcport")) != 0 )
{
isPoS = jint(item,"isPoS");
@ -292,7 +292,13 @@ struct iguana_info *LP_coincreate(cJSON *item)
coin = LP_coinadd(&cdata);
}
if ( coin != 0 && item != 0 )
coin->inactive = (strcmp("KMD",coin->symbol) == 0) ? 0 : !jint(item,"active");
{
if ( strcmp("KMD",coin->symbol) != 0 )
{
if ( IAMLP == 0 || assetname != name )
coin->inactive = !jint(item,"active");
}
}
return(0);
}

2
iguana/exchanges/LP_utxos.c

@ -765,7 +765,7 @@ bits256 LP_privkeycalc(void *ctx,uint8_t *pubkey33,bits256 *pubkeyp,struct iguan
userpub = curve25519(userpass,curve25519_basepoint9());
printf("userpass.(%s)\n",bits256_str(USERPASS,userpub));
}
if ( coin->inactive == 0 && (retjson= LP_importprivkey(coin->symbol,tmpstr,coin->smartaddr,-1)) != 0 )
if ( (retjson= LP_importprivkey(coin->symbol,tmpstr,coin->smartaddr,-1)) != 0 ) //coin->inactive == 0 &&
printf("importprivkey -> (%s)\n",jprint(retjson,1));
}
LP_mypubkey = *pubkeyp = curve25519(privkey,curve25519_basepoint9());

Loading…
Cancel
Save