From 88cef257c465365384566a31fdf139988d04b172 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 6 Jul 2017 19:10:39 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_nativeDEX.c | 1 + iguana/exchanges/LP_swap.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index c547dfc0c..5bdbab8d3 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -21,6 +21,7 @@ // stronger anti rejected utxo pair into swap statemachine // as much as possible on a unidirectional basis // verify bid volumes +// debounce comms // stats // auto-utxo creation diff --git a/iguana/exchanges/LP_swap.c b/iguana/exchanges/LP_swap.c index 3ae4b853a..5b9a1c0ee 100644 --- a/iguana/exchanges/LP_swap.c +++ b/iguana/exchanges/LP_swap.c @@ -686,11 +686,11 @@ void LP_bobloop(void *_swap) basilisk_bobdeposit_refund(swap,swap->I.putduration); //printf("depositlen.%d\n",swap->bobdeposit.I.datalen); LP_swapsfp_update(&swap->I.req); - if ( LP_waitfor(swap->N.pair,swap,LP_SWAPSTEP_TIMEOUT,LP_verify_otherfee) < 0 ) + if ( LP_waitfor(swap->N.pair,swap,LP_SWAPSTEP_TIMEOUT*3,LP_verify_otherfee) < 0 ) printf("error waiting for alicefee\n"); else if ( LP_swapdata_rawtxsend(swap->N.pair,swap,0x200,data,maxlen,&swap->bobdeposit,0x100,0) == 0 ) printf("error sending bobdeposit\n"); - else if ( LP_waitfor(swap->N.pair,swap,LP_SWAPSTEP_TIMEOUT,LP_verify_alicepayment) < 0 ) + else if ( LP_waitfor(swap->N.pair,swap,LP_SWAPSTEP_TIMEOUT*3,LP_verify_alicepayment) < 0 ) printf("error waiting for alicepayment\n"); else { @@ -742,7 +742,7 @@ void LP_aliceloop(void *_swap) LP_swapsfp_update(&swap->I.req); if ( LP_swapdata_rawtxsend(swap->N.pair,swap,0x80,data,maxlen,&swap->myfee,0x40,0) == 0 ) printf("error sending alicefee\n"); - else if ( LP_waitfor(swap->N.pair,swap,LP_SWAPSTEP_TIMEOUT,LP_verify_bobdeposit) < 0 ) + else if ( LP_waitfor(swap->N.pair,swap,LP_SWAPSTEP_TIMEOUT*3,LP_verify_bobdeposit) < 0 ) printf("error waiting for bobdeposit\n"); else if ( LP_swapdata_rawtxsend(swap->N.pair,swap,0x1000,data,maxlen,&swap->alicepayment,0x800,0) == 0 ) printf("error sending alicepayment\n"); @@ -754,7 +754,7 @@ void LP_aliceloop(void *_swap) sleep(LP_SWAPSTEP_TIMEOUT); } swap->sentflag = 1; - if ( LP_waitfor(swap->N.pair,swap,LP_SWAPSTEP_TIMEOUT,LP_verify_bobpayment) < 0 ) + if ( LP_waitfor(swap->N.pair,swap,LP_SWAPSTEP_TIMEOUT*3,LP_verify_bobpayment) < 0 ) printf("error waiting for bobpayment\n"); else {