From bcca6d4d0b69327b5092fe6b378057d915c133f2 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 2 Jul 2016 09:10:04 -0300 Subject: [PATCH] test --- basilisk/basilisk_swap.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/basilisk/basilisk_swap.c b/basilisk/basilisk_swap.c index 1156ebd55..a9e4b2435 100755 --- a/basilisk/basilisk_swap.c +++ b/basilisk/basilisk_swap.c @@ -528,6 +528,13 @@ void basilisk_swaploop(void *_swap) #ifndef __APPLE__ getchar(); #endif + if ( bitcoin_swapinit(myinfo,swap) == 0 ) + { + printf("bitcoin_swapinit error\n"); + return; + } + printf("back from swapinit\n"); + maxlen = sizeof(*swap); data = malloc(maxlen); while ( time(NULL) < swap->expiration ) @@ -715,12 +722,8 @@ struct basilisk_swap *basilisk_thread_start(struct supernet_info *myinfo,struct swap->req = *rp; swap->myinfo = myinfo; printf("START swap requestid.%u\n",rp->requestid); - if ( bitcoin_swapinit(myinfo,swap) != 0 ) - { - printf("back from swapinit\n"); - myinfo->swaps[myinfo->numswaps++] = swap; - iguana_launch(iguana_coinfind("BTCD"),"basilisk_swaploop",basilisk_swaploop,swap,IGUANA_PERMTHREAD); - } else free(swap), swap = 0; + myinfo->swaps[myinfo->numswaps++] = swap; + iguana_launch(iguana_coinfind("BTCD"),"basilisk_swaploop",basilisk_swaploop,swap,IGUANA_PERMTHREAD); } portable_mutex_unlock(&myinfo->DEX_swapmutex); return(swap);