From 25bff23dbbc18d9730b5fff47856b1f509851e58 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 24 May 2016 02:18:21 -0500 Subject: [PATCH] test --- iguana/iguana_exchanges.c | 2 +- iguana/iguana_instantdex.c | 5 +++-- iguana/swaps/iguana_BTCswap.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/iguana/iguana_exchanges.c b/iguana/iguana_exchanges.c index 417bf9f83..bb83be323 100755 --- a/iguana/iguana_exchanges.c +++ b/iguana/iguana_exchanges.c @@ -585,7 +585,7 @@ char *exchanges777_process(struct exchange_info *exchange,int32_t *retvalp,struc void iguana_statemachineupdate(struct supernet_info *myinfo,struct exchange_info *exchange) { - int32_t timemod,modwidth = 1; struct iguana_info *coin; struct bitcoin_swapinfo *swap,*tmp; struct iguana_bundlereq *req; + int32_t timemod,modwidth = 3; struct iguana_info *coin; struct bitcoin_swapinfo *swap,*tmp; struct iguana_bundlereq *req; timemod = time(NULL) % modwidth; coin = iguana_coinfind("BTCD"); portable_mutex_lock(&exchange->mutexS); diff --git a/iguana/iguana_instantdex.c b/iguana/iguana_instantdex.c index 54e584abb..6e0e87a79 100755 --- a/iguana/iguana_instantdex.c +++ b/iguana/iguana_instantdex.c @@ -1331,7 +1331,8 @@ char *instantdex_parse(struct supernet_info *myinfo,struct instantdex_msghdr *ms } A.offer = *offer; A.orderid = orderhash.txid; - printf("got.(%s) have.%x for %llx account.%llu serdatalen.%d\n",cmdstr,juint(argjson,"have"),(long long)A.orderid,(long long)A.offer.account,serdatalen); + if ( strcmp("poll",cmdstr) != 0 ) + printf("got.(%s) have.%x for %llx account.%llu serdatalen.%d\n",cmdstr,juint(argjson,"have"),(long long)A.orderid,(long long)A.offer.account,serdatalen); if ( (A.offer.minperc= jdouble(argjson,"p")) < INSTANTDEX_MINPERC ) A.offer.minperc = INSTANTDEX_MINPERC; else if ( A.offer.minperc > 100 ) @@ -1384,7 +1385,7 @@ char *instantdex_parse(struct supernet_info *myinfo,struct instantdex_msghdr *ms } else { - printf("cant find existing order.%llx that matches\n",(long long)A.orderid); + //printf("cant find existing order.%llx that matches\n",(long long)A.orderid); return(clonestr("{\"error\":\"cant find matching order\"}")); } } diff --git a/iguana/swaps/iguana_BTCswap.c b/iguana/swaps/iguana_BTCswap.c index 681092c2c..b868dc4b1 100755 --- a/iguana/swaps/iguana_BTCswap.c +++ b/iguana/swaps/iguana_BTCswap.c @@ -1260,7 +1260,7 @@ char *instantdex_statemachine(struct instantdex_stateinfo *states,int32_t numsta if ( state->events[i].nextstateind > 1 ) { instantdex_newjson(myinfo,swap,newjson); - printf("i.%d (%s) %s %s.%d -> %s.%d send.(%s) %p\n",i,jprint(newjson,0),cmdstr,swap->state->name,state->ind,states[state->events[i].nextstateind].name,state->events[i].nextstateind,state->events[i].sendcmd,&states[state->events[i].nextstateind]); + //printf("i.%d (%s) %s %s.%d -> %s.%d send.(%s) %p\n",i,jprint(newjson,0),cmdstr,swap->state->name,state->ind,states[state->events[i].nextstateind].name,state->events[i].nextstateind,state->events[i].sendcmd,&states[state->events[i].nextstateind]); swap->state = &states[state->events[i].nextstateind]; return(instantdex_sendcmd(myinfo,&swap->mine.offer,newjson,state->events[i].sendcmd,swap->othertrader,INSTANTDEX_HOPS,serdata,serdatalen,0,swap)); } else return(clonestr("{\"error\":\"instantdex_statemachine: illegal state\"}"));