Browse Source

Test

etomic
jl777 8 years ago
parent
commit
55188bb475
  1. 10
      iguana/exchanges/LP_nativeDEX.c
  2. 2
      iguana/exchanges/mm.c

10
iguana/exchanges/LP_nativeDEX.c

@ -27,8 +27,8 @@ struct LP_utxoinfo *LP_utxoinfos;
struct LP_peerinfo *LP_peerinfos,*LP_mypeer;
char *activecoins[] = { "BTC", "KMD", "REVS", "JUMBLR" };//"LTC", "USD", };
char GLOBAL_DBDIR[] = "DB";
char USERPASS[65],USERPASS_WIFSTR[64];
char GLOBAL_DBDIR[] = { "DB" };
char USERPASS[65],USERPASS_WIFSTR[64],USERHOME[512] = { "/root" };
char *default_LPnodes[] = { "5.9.253.196", "5.9.253.197", "5.9.253.198", "5.9.253.199", "5.9.253.200", "5.9.253.201", "5.9.253.202", "5.9.253.203", "5.9.253.204" }; //"5.9.253.195",
@ -56,7 +56,7 @@ void tradebot_pendingadd(cJSON *tradejson,char *base,double basevolume,char *rel
}
char *LP_getdatadir()
{
return("/root");
return(USERHOME);
}
char *blocktrail_listtransactions(char *symbol,char *coinaddr,int32_t num,int32_t skip)
@ -229,12 +229,14 @@ void LP_mainloop(struct LP_peerinfo *mypeer,uint16_t mypubport,int32_t pubsock,i
}
}
void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,double profitmargin,char *passphrase,int32_t amclient)
void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,double profitmargin,char *passphrase,int32_t amclient,char *userhome)
{
char *myipaddr=0; long filesize,n; int32_t timeout,maxsize,pullsock=-1,pubsock=-1; struct LP_peerinfo *mypeer=0; char pushaddr[128],subaddr[128];
IAMCLIENT = amclient;
OS_randombytes((void *)&n,sizeof(n));
srand((int32_t)n);
if ( userhome != 0 && userhome[0] != 0 )
safecopy(USERHOME,userhome,sizeof(USERHOME));
portable_mutex_init(&LP_peermutex);
portable_mutex_init(&LP_utxomutex);
portable_mutex_init(&LP_commandmutex);

2
iguana/exchanges/mm.c

@ -811,7 +811,7 @@ void LP_main(void *ptr)
if ( (passphrase= jstr(argjson,"passphrase")) != 0 )
{
profitmargin = jdouble(argjson,"profitmargin");
LPinit(7779,7780,7781,profitmargin,passphrase,jint(argjson,"client"));
LPinit(7779,7780,7781,profitmargin,passphrase,jint(argjson,"client"),jstr(argjson,"userhome"));
}
}

Loading…
Cancel
Save