Browse Source

Test

etomic
jl777 7 years ago
parent
commit
207cfaa609
  1. 4
      iguana/exchanges/LP_NXT.c
  2. 40
      iguana/exchanges/LP_nativeDEX.c
  3. 7
      iguana/exchanges/LP_portfolio.c
  4. 2
      iguana/exchanges/coins
  5. 2
      iguana/exchanges/prices/autoprice

4
iguana/exchanges/LP_NXT.c

@ -202,9 +202,7 @@ void NXTventure_liquidation()
cJSON *LP_NXT_redeems()
{
char url[1024],*retstr,*recv,*method,*msgstr,assetname[128]; uint64_t totals[2][sizeof(assetids)/sizeof(*assetids)],mult,txnum,assetid,qty; int32_t i,ind,numtx=0,past_marker=0; cJSON *item,*attach,*decjson,*array,*msgjson,*encjson,*retjson=0;
//sleep 1; fiat/supernet sendtoaddress RNZZuQYu8xJLZHuekhd96hYfoQuiCMz99T 1001.44150000 # txnum.8537615468620726612
//sleep 1; fiat/pangea sendtoaddress RWMdRaUmMZqKkEibwEhY6XS3RLCXJDWHTi 22.10910000 # txnum.2649622877615958504
uint64_t txnum_marker = calc_nxt64bits("8537615468620726612"); // 2649622877615958504"); // set to most recent processed
uint64_t txnum_marker = calc_nxt64bits("4114304329372848717"); // 8537615468620726612"); // set to most recent processed
uint64_t txnum_marker2 = calc_nxt64bits("7256847492742571143"); // dont change, end marker
char *passphrase = "";
char *account = "NXT-MRBN-8DFH-PFMK-A4DBM";

40
iguana/exchanges/LP_nativeDEX.c

@ -483,6 +483,11 @@ void command_rpcloop(void *ctx)
command_rpcloop_stats.threshold = 2500.;
while ( LP_STOP_RECEIVED == 0 )
{
if ( G.initializing != 0 )
{
sleep(1);
continue;
}
LP_millistats_update(&command_rpcloop_stats);
nonz = LP_nanomsg_recvs(ctx);
//if ( LP_mybussock >= 0 )
@ -518,6 +523,11 @@ void LP_coinsloop(void *_coins)
}
while ( LP_STOP_RECEIVED == 0 )
{
if ( G.initializing != 0 )
{
sleep(1);
continue;
}
if ( strcmp(G.USERPASS,"1d8b27b21efabcd96571cd56f91a40fb9aa4cc623d273c63bf9223dc6f8cd81f") == 0 )
{
sleep(10);
@ -914,6 +924,11 @@ void LP_pubkeysloop(void *ctx)
sleep(10);
while ( LP_STOP_RECEIVED == 0 )
{
if ( G.initializing != 0 )
{
sleep(1);
continue;
}
if ( strcmp(G.USERPASS,"1d8b27b21efabcd96571cd56f91a40fb9aa4cc623d273c63bf9223dc6f8cd81f") != 0 )
{
LP_millistats_update(&LP_pubkeysloop_stats);
@ -936,6 +951,11 @@ void LP_swapsloop(void *ctx)
sleep(50);
while ( LP_STOP_RECEIVED == 0 )
{
if ( G.initializing != 0 )
{
sleep(1);
continue;
}
if ( strcmp(G.USERPASS,"1d8b27b21efabcd96571cd56f91a40fb9aa4cc623d273c63bf9223dc6f8cd81f") != 0 )
{
LP_millistats_update(&LP_swapsloop_stats);
@ -953,6 +973,11 @@ void gc_loop(void *ctx)
LP_gcloop_stats.threshold = 11000.;
while ( LP_STOP_RECEIVED == 0 )
{
if ( G.initializing != 0 )
{
sleep(1);
continue;
}
flag = 0;
LP_millistats_update(&LP_gcloop_stats);
portable_mutex_lock(&LP_gcmutex);
@ -988,6 +1013,11 @@ void queue_loop(void *ctx)
queue_loop_stats.threshold = 1000.;
while ( LP_STOP_RECEIVED == 0 )
{
if ( G.initializing != 0 )
{
sleep(1);
continue;
}
LP_millistats_update(&queue_loop_stats);
//printf("LP_Q.%p next.%p prev.%p\n",LP_Q,LP_Q!=0?LP_Q->next:0,LP_Q!=0?LP_Q->prev:0);
n = nonz = flag = 0;
@ -1097,6 +1127,11 @@ void LP_reserved_msgs(void *ignore)
LP_reserved_msgs_stats.threshold = 1000.;
while ( LP_STOP_RECEIVED == 0 )
{
if ( G.initializing != 0 )
{
sleep(1);
continue;
}
nonz = 0;
LP_millistats_update(&LP_reserved_msgs_stats);
if ( num_Reserved_msgs[0] > 0 || num_Reserved_msgs[1] > 0 )
@ -1390,6 +1425,11 @@ void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,uint16_t mybu
//fprintf(stderr,".");
sleep(3);
}
if ( G.initializing != 0 )
{
sleep(1);
continue;
}
if ( LP_mainloop_iter(ctx,myipaddr,mypeer,LP_mypubsock) != 0 )
nonz++;
if ( didremote == 0 && LP_cmdcount > 0 )

7
iguana/exchanges/LP_portfolio.c

@ -840,9 +840,14 @@ void prices_loop(void *ctx)
{
char *retstr; cJSON *retjson,*array; char *buycoin,*sellcoin; struct iguana_info *buy,*sell; uint32_t requestid,quoteid; int32_t i,n,m; struct LP_portfoliotrade trades[256]; struct LP_priceinfo *btcpp;
strcpy(prices_loop_stats.name,"prices_loop");
prices_loop_stats.threshold = 191000.;
prices_loop_stats.threshold = 600000.;
while ( LP_STOP_RECEIVED == 0 )
{
if ( G.initializing != 0 )
{
sleep(1);
continue;
}
//printf("prices loop autoprices.%d autorefs.%d\n",LP_autoprices,num_LP_autorefs);
LP_millistats_update(&prices_loop_stats);
LP_tradebots_timeslice(ctx);

2
iguana/exchanges/coins

File diff suppressed because one or more lines are too long

2
iguana/exchanges/prices/autoprice

@ -10,7 +10,7 @@ curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"HUSH\",\"rel\":\"KMD\",\"margin\":$margin,\"refbase\":\"hush\",\"refrel\":\"coinmarketcap\"}"
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"KMD\",\"rel\":\"BTCH\",\"offset\":0.0,\"refbase\":\"KMD\",\"refrel\":\"HUSH\",\"factor\":1.44,\"buymargin\":0.05,\"sellmargin\":0.05}"
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"BTCH\",\"rel\":\"KMD\",\"offset\":0.0,\"refbase\":\"HUSH\",\"refrel\":\"KMD\",\"factor\":0.7,\"buymargin\":0.05,\"sellmargin\":0.05}"
#curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"BTCH\",\"rel\":\"KMD\",\"offset\":0.0,\"refbase\":\"HUSH\",\"refrel\":\"KMD\",\"factor\":0.7,\"buymargin\":0.05,\"sellmargin\":0.05}"
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"BEER\",\"rel\":\"PIZZA\",\"fixed\":0.0001,\"margin\":0.00001}"

Loading…
Cancel
Save