|
|
@ -373,7 +373,7 @@ struct iguana_info *LP_coinadd(struct iguana_info *cdata) |
|
|
|
return(coin); |
|
|
|
} |
|
|
|
|
|
|
|
uint16_t LP_coininit(struct iguana_info *coin,char *symbol,char *name,char *assetname,int32_t isPoS,uint16_t port,uint8_t pubtype,uint8_t p2shtype,uint8_t wiftype,uint64_t txfee,double estimatedrate,int32_t longestchain,uint8_t wiftaddr,uint8_t taddr,uint16_t busport,char *confpath) |
|
|
|
uint16_t LP_coininit(struct iguana_info *coin,char *symbol,char *name,char *assetname,int32_t isPoS,uint16_t port,uint8_t pubtype,uint8_t p2shtype,uint8_t wiftype,uint64_t txfee,double estimatedrate,int32_t longestchain,uint8_t wiftaddr,uint8_t taddr,uint16_t busport,char *confpath,uint8_t decimals) |
|
|
|
{ |
|
|
|
static void *ctx; |
|
|
|
char *name2; uint16_t origport = port; |
|
|
@ -429,6 +429,7 @@ uint16_t LP_coininit(struct iguana_info *coin,char *symbol,char *name,char *asse |
|
|
|
coin->zcash = LP_IS_BITCOINGOLD; |
|
|
|
printf("set coin.%s <- LP_IS_BITCOINGOLD %d\n",symbol,coin->zcash); |
|
|
|
} |
|
|
|
coin->decimals = decimals; |
|
|
|
return(port); |
|
|
|
} |
|
|
|
|
|
|
@ -472,7 +473,7 @@ struct iguana_info *LP_coinfind(char *symbol) |
|
|
|
else if ( strcmp(symbol,"KMD") == 0 ) |
|
|
|
name = "komodo"; |
|
|
|
else return(0); |
|
|
|
port = LP_coininit(&cdata,symbol,name,assetname,isPoS,port,pubtype,p2shtype,wiftype,txfee,estimatedrate,longestchain,0,0,busport,0); |
|
|
|
port = LP_coininit(&cdata,symbol,name,assetname,isPoS,port,pubtype,p2shtype,wiftype,txfee,estimatedrate,longestchain,0,0,busport,0,0); |
|
|
|
if ( port == 0 ) |
|
|
|
isinactive = 1; |
|
|
|
else isinactive = 0; |
|
|
@ -516,8 +517,8 @@ struct iguana_info *LP_coincreate(cJSON *item) |
|
|
|
else if ( (name= jstr(item,"name")) == 0 ) |
|
|
|
name = symbol; |
|
|
|
|
|
|
|
cdata.decimals = juint(item,"decimals"); |
|
|
|
if ( LP_coininit(&cdata,symbol,name,assetname==0?"":assetname,isPoS,port,pubtype,p2shtype,wiftype,txfee,estimatedrate,longestchain,juint(item,"wiftaddr"),juint(item,"taddr"),LP_busport(port),jstr(item,"confpath")) < 0 ) |
|
|
|
uint8_t decimals = juint(item,"decimals"); |
|
|
|
if ( LP_coininit(&cdata,symbol,name,assetname==0?"":assetname,isPoS,port,pubtype,p2shtype,wiftype,txfee,estimatedrate,longestchain,juint(item,"wiftaddr"),juint(item,"taddr"),LP_busport(port),jstr(item,"confpath"),decimals) < 0 ) |
|
|
|
{ |
|
|
|
coin = LP_coinadd(&cdata); |
|
|
|
coin->inactive = (uint32_t)time(NULL); |
|
|
|