Browse Source

Test

etomic
jl777 8 years ago
parent
commit
6757d89640
  1. 2
      iguana/exchanges/LP_include.h
  2. 4
      iguana/exchanges/LP_swap.c

2
iguana/exchanges/LP_include.h

@ -30,7 +30,7 @@
#define MAX_PSOCK_PORT 60000 #define MAX_PSOCK_PORT 60000
#define MIN_PSOCK_PORT 10000 #define MIN_PSOCK_PORT 10000
#define LP_HTTP_TIMEOUT 3 #define LP_HTTP_TIMEOUT 1
#define LP_MAXPEER_ERRORS 3 #define LP_MAXPEER_ERRORS 3
#define LP_SWAPSTEP_TIMEOUT 3 #define LP_SWAPSTEP_TIMEOUT 3
#define LP_AUTOTRADE_TIMEOUT 3 #define LP_AUTOTRADE_TIMEOUT 3

4
iguana/exchanges/LP_swap.c

@ -662,7 +662,7 @@ void LP_bobloop(void *_swap)
expiration = (uint32_t)time(NULL) + LP_SWAPSTEP_TIMEOUT; expiration = (uint32_t)time(NULL) + LP_SWAPSTEP_TIMEOUT;
if ( swap != 0 ) if ( swap != 0 )
{ {
if ( LP_waitsend("pubkeys",5*LP_SWAPSTEP_TIMEOUT,swap->N.pair,swap,data,maxlen,LP_pubkeys_verify,LP_pubkeys_data) < 0 ) if ( LP_waitsend("pubkeys",15*LP_SWAPSTEP_TIMEOUT,swap->N.pair,swap,data,maxlen,LP_pubkeys_verify,LP_pubkeys_data) < 0 )
printf("error waitsend pubkeys\n"); printf("error waitsend pubkeys\n");
else if ( LP_waitsend("choosei",LP_SWAPSTEP_TIMEOUT,swap->N.pair,swap,data,maxlen,LP_choosei_verify,LP_choosei_data) < 0 ) else if ( LP_waitsend("choosei",LP_SWAPSTEP_TIMEOUT,swap->N.pair,swap,data,maxlen,LP_choosei_verify,LP_choosei_data) < 0 )
printf("error waitsend choosei\n"); printf("error waitsend choosei\n");
@ -718,7 +718,7 @@ void LP_aliceloop(void *_swap)
if ( swap != 0 ) if ( swap != 0 )
{ {
fprintf(stderr,"start swap iamalice pair.%d\n",swap->N.pair); fprintf(stderr,"start swap iamalice pair.%d\n",swap->N.pair);
if ( LP_sendwait("pubkeys",5*LP_SWAPSTEP_TIMEOUT,swap->N.pair,swap,data,maxlen,LP_pubkeys_verify,LP_pubkeys_data) < 0 ) if ( LP_sendwait("pubkeys",15*LP_SWAPSTEP_TIMEOUT,swap->N.pair,swap,data,maxlen,LP_pubkeys_verify,LP_pubkeys_data) < 0 )
printf("error LP_sendwait pubkeys\n"); printf("error LP_sendwait pubkeys\n");
else if ( LP_sendwait("choosei",LP_SWAPSTEP_TIMEOUT,swap->N.pair,swap,data,maxlen,LP_choosei_verify,LP_choosei_data) < 0 ) else if ( LP_sendwait("choosei",LP_SWAPSTEP_TIMEOUT,swap->N.pair,swap,data,maxlen,LP_choosei_verify,LP_choosei_data) < 0 )
printf("error LP_sendwait choosei\n"); printf("error LP_sendwait choosei\n");

Loading…
Cancel
Save