From ab756fd1bea701eb3064bc7070eff81c9b9dae1b Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 9 May 2016 22:19:54 -0500 Subject: [PATCH] test --- iguana/exchanges777.h | 1 - iguana/iguana777.h | 1 + iguana/iguana_exchanges.c | 4 ++-- iguana/iguana_recv.c | 3 +++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/iguana/exchanges777.h b/iguana/exchanges777.h index 18a3eddce..b8e08728d 100755 --- a/iguana/exchanges777.h +++ b/iguana/exchanges777.h @@ -179,7 +179,6 @@ double fxcm_price(struct exchange_info *exchange,char *base,char *rel,struct exc double instaforex_price(struct exchange_info *exchange,char *base,char *rel,struct exchange_quote *bidasks,int32_t maxdepth,double commission,cJSON *argjson,int32_t invert); char *instantdex_createaccept(struct supernet_info *myinfo,struct instantdex_accept **aptrp,struct exchange_info *exchange,char *base,char *rel,double price,double basevolume,int32_t acceptdir,char *mysidestr,int32_t duration,uint64_t offerer,int32_t queueflag,uint8_t minperc); -void instantdex_update(struct supernet_info *myinfo); char *instantdex_sendcmd(struct supernet_info *myinfo,struct instantdex_offer *offer,cJSON *argjson,char *cmdstr,bits256 desthash,int32_t hops,void *extra,int32_t extralen); char *instantdex_sendoffer(struct supernet_info *myinfo,struct exchange_info *exchange,struct instantdex_accept *ap,cJSON *argjson); // Bob sending to network (Alice) struct bitcoin_swapinfo *instantdex_statemachinefind(struct supernet_info *myinfo,struct exchange_info *exchange,uint64_t orderid,int32_t requeueflag); diff --git a/iguana/iguana777.h b/iguana/iguana777.h index 2ae150750..c6bbea771 100755 --- a/iguana/iguana777.h +++ b/iguana/iguana777.h @@ -968,6 +968,7 @@ struct instantdex_accept *instantdex_quotefind(struct supernet_info *myinfo,stru int32_t instantdex_quoterequest(struct supernet_info *myinfo,struct iguana_info *coin,uint8_t *serialized,int32_t maxlen,struct iguana_peer *addr,bits256 encodedhash); int32_t instantdex_peerhas_clear(struct supernet_info *myinfo,struct iguana_info *coin,struct iguana_peer *addr); int32_t instantdex_quote(struct supernet_info *myinfo,struct iguana_info *coin,struct iguana_peer *addr,uint8_t *serialized,int32_t recvlen); +void instantdex_update(struct supernet_info *myinfo); extern int32_t HDRnet,netBLOCKS; diff --git a/iguana/iguana_exchanges.c b/iguana/iguana_exchanges.c index 9037e022f..978bf1f17 100755 --- a/iguana/iguana_exchanges.c +++ b/iguana/iguana_exchanges.c @@ -658,11 +658,11 @@ void exchanges777_loop(void *ptr) tradebot_timeslice(exchange,bot); if ( time(NULL) > exchange->lastpoll+exchange->pollgap ) { - if ( strcmp(exchange->name,"bitcoin") == 0 ) + /*if ( strcmp(exchange->name,"bitcoin") == 0 ) { instantdex_update(SuperNET_MYINFO(0)); //printf("InstantDEX call update\n"); - } + }*/ if ( (req= queue_dequeue(&exchange->pricesQ,0)) != 0 ) { //printf("check %s pricesQ (%s %s)\n",exchange->name,req->base,req->rel); diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index 0263f80be..9dbd88d1d 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -1604,6 +1604,9 @@ int32_t iguana_processrecv(struct supernet_info *myinfo,struct iguana_info *coin } coin->RTramchain_busy = 0;//(coin->RTgenesis == 0); flag += iguana_process_msgrequestQ(myinfo,coin); + if ( strcmp("BTCD",coin->symbol) == 0 ) + instantdex_update(SuperNET_MYINFO(0)); + iguana_jsonQ(); if ( hwmheight != coin->blocks.hwmchain.height ) flag = 1;