Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
d4e96cf988
  1. 4
      basilisk/basilisk_swap.c

4
basilisk/basilisk_swap.c

@ -525,6 +525,9 @@ void basilisk_swaploop(void *_swap)
uint8_t *data; int32_t i,j,maxlen,datalen,numconfirms; struct supernet_info *myinfo; struct basilisk_swap *swap = _swap; uint8_t *data; int32_t i,j,maxlen,datalen,numconfirms; struct supernet_info *myinfo; struct basilisk_swap *swap = _swap;
myinfo = swap->myinfo; myinfo = swap->myinfo;
printf("start swap\n"); printf("start swap\n");
#ifndef __APPLE__
getchar();
#endif
maxlen = sizeof(*swap); maxlen = sizeof(*swap);
data = malloc(maxlen); data = malloc(maxlen);
while ( time(NULL) < swap->expiration ) while ( time(NULL) < swap->expiration )
@ -714,6 +717,7 @@ struct basilisk_swap *basilisk_thread_start(struct supernet_info *myinfo,struct
printf("START swap requestid.%u\n",rp->requestid); printf("START swap requestid.%u\n",rp->requestid);
if ( bitcoin_swapinit(myinfo,swap) != 0 ) if ( bitcoin_swapinit(myinfo,swap) != 0 )
{ {
printf("back from swapinit\n");
myinfo->swaps[myinfo->numswaps++] = swap; myinfo->swaps[myinfo->numswaps++] = swap;
iguana_launch(iguana_coinfind("BTCD"),"basilisk_swaploop",basilisk_swaploop,swap,IGUANA_PERMTHREAD); iguana_launch(iguana_coinfind("BTCD"),"basilisk_swaploop",basilisk_swaploop,swap,IGUANA_PERMTHREAD);
} else free(swap), swap = 0; } else free(swap), swap = 0;

Loading…
Cancel
Save