|
|
@ -397,6 +397,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 = 1; uint16_t port; uint64_t txfee; double estimatedrate; uint8_t pubtype,p2shtype,wiftype; char *name=0,*symbol,*assetname=0; |
|
|
|
printf("LP_coincreate\n"); |
|
|
|
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"); |
|
|
@ -415,6 +416,7 @@ struct iguana_info *LP_coincreate(cJSON *item) |
|
|
|
} |
|
|
|
else if ( (name= jstr(item,"name")) == 0 ) |
|
|
|
name = symbol; |
|
|
|
printf("LP_coininit\n"); |
|
|
|
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 ) |
|
|
|
{ |
|
|
|
coin = LP_coinadd(&cdata); |
|
|
@ -436,7 +438,7 @@ struct iguana_info *LP_coincreate(cJSON *item) |
|
|
|
} |
|
|
|
} else coin->inactive = 0; |
|
|
|
} |
|
|
|
if ( 0 && coin != 0 && coin->inactive != 0 ) |
|
|
|
if ( coin != 0 && coin->inactive != 0 ) |
|
|
|
printf("LPnode.%d %s inactive.%u %p vs %p\n",IAMLP,coin->symbol,coin->inactive,assetname,name); |
|
|
|
return(0); |
|
|
|
} |
|
|
|