Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
ab756fd1be
  1. 1
      iguana/exchanges777.h
  2. 1
      iguana/iguana777.h
  3. 4
      iguana/iguana_exchanges.c
  4. 3
      iguana/iguana_recv.c

1
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);

1
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;

4
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);

3
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;

Loading…
Cancel
Save