Browse Source

coins.json support

the logic is if there is no coins object in the command line json, it
will look for a file called coins.json in the same directory as the
executable

in unix and osx that is one dir above

so I copied the coins file to ../coins.json

then edit it to remove the inital shell script definition and the ""
around the []

internally i call unstringify to remove all the backslashes, so
basically the same file contents as coins can be used
etomic
jl777 7 years ago
parent
commit
e56fa4c798
  1. 1
      iguana/exchanges/LP_nativeDEX.c

1
iguana/exchanges/LP_nativeDEX.c

@ -700,7 +700,6 @@ void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,uint16_t mybu
LP_mybussock = LP_coinbus(mybusport); LP_mybussock = LP_coinbus(mybusport);
//LP_deadman_switch = (uint32_t)time(NULL); //LP_deadman_switch = (uint32_t)time(NULL);
printf("canbind.%d my command address is (%s) pullsock.%d pullport.%u\n",LP_canbind,pushaddr,LP_mypullsock,mypullport); printf("canbind.%d my command address is (%s) pullsock.%d pullport.%u\n",LP_canbind,pushaddr,LP_mypullsock,mypullport);
printf("initcoins\n");
if ( (coinsjson= jobj(argjson,"coins")) == 0 ) if ( (coinsjson= jobj(argjson,"coins")) == 0 )
{ {
if ( (coins_str= OS_filestr(&filesize,"coins.json")) != 0 ) if ( (coins_str= OS_filestr(&filesize,"coins.json")) != 0 )

Loading…
Cancel
Save