Browse Source

test

etomic
jl777 8 years ago
parent
commit
0f289e070f
  1. 16
      basilisk/basilisk_swap.c
  2. 2
      iguana/iguana_payments.c

16
basilisk/basilisk_swap.c

@ -1732,8 +1732,8 @@ void basilisk_swaploop(void *_swap)
if ( (swap->I.statebits & (0x08|0x02)) == (0x08|0x02) ) if ( (swap->I.statebits & (0x08|0x02)) == (0x08|0x02) )
break; break;
sleep(1); sleep(1);
//dpow_nanomsg_update(myinfo); dpow_nanomsg_update(myinfo);
//dex_updateclient(myinfo); dex_updateclient(myinfo);
} }
while ( (swap->I.statebits & 0x20) == 0 && time(NULL) < expiration ) while ( (swap->I.statebits & 0x20) == 0 && time(NULL) < expiration )
{ {
@ -1747,8 +1747,8 @@ void basilisk_swaploop(void *_swap)
break; break;
} }
sleep(3 + (swap->I.iambob == 0)*1); sleep(3 + (swap->I.iambob == 0)*1);
//dpow_nanomsg_update(myinfo); dpow_nanomsg_update(myinfo);
//dex_updateclient(myinfo); dex_updateclient(myinfo);
} }
if ( time(NULL) >= expiration ) if ( time(NULL) >= expiration )
retval = -1; retval = -1;
@ -1756,8 +1756,8 @@ void basilisk_swaploop(void *_swap)
printf("C r%u/q%u swapstate.%x\n",swap->I.req.requestid,swap->I.req.quoteid,swap->I.statebits); printf("C r%u/q%u swapstate.%x\n",swap->I.req.requestid,swap->I.req.quoteid,swap->I.statebits);
while ( retval == 0 && (swap->I.statebits & 0x40) == 0 ) // send fee while ( retval == 0 && (swap->I.statebits & 0x40) == 0 ) // send fee
{ {
//dpow_nanomsg_update(myinfo); dpow_nanomsg_update(myinfo);
//dex_updateclient(myinfo); dex_updateclient(myinfo);
basilisk_sendstate(myinfo,swap,data,maxlen); basilisk_sendstate(myinfo,swap,data,maxlen);
basilisk_swapget(myinfo,swap,0x80000000,data,maxlen,basilisk_verify_otherstatebits); basilisk_swapget(myinfo,swap,0x80000000,data,maxlen,basilisk_verify_otherstatebits);
if ( swap->myfee.txbytes == 0 ) if ( swap->myfee.txbytes == 0 )
@ -1849,8 +1849,8 @@ void basilisk_swaploop(void *_swap)
basilisk_swapget(myinfo,swap,0x80000000,data,maxlen,basilisk_verify_otherstatebits); basilisk_swapget(myinfo,swap,0x80000000,data,maxlen,basilisk_verify_otherstatebits);
if ( time(NULL) > swap->I.expiration ) if ( time(NULL) > swap->I.expiration )
break; break;
//dpow_nanomsg_update(myinfo); dpow_nanomsg_update(myinfo);
//dex_updateclient(myinfo); dex_updateclient(myinfo);
} }
printf("end of atomic swap\n"); printf("end of atomic swap\n");
if ( swap->I.iambob != 0 && swap->bobdeposit.txbytes != 0 ) if ( swap->I.iambob != 0 && swap->bobdeposit.txbytes != 0 )

2
iguana/iguana_payments.c

@ -414,7 +414,7 @@ char *iguana_calcrawtx(struct supernet_info *myinfo,struct iguana_info *coin,cJS
coinaddr = jstri(addresses,i); coinaddr = jstri(addresses,i);
if ( (array= basilisk_unspents(myinfo,coin,coinaddr)) != 0 ) if ( (array= basilisk_unspents(myinfo,coin,coinaddr)) != 0 )
{ {
printf("unspents.(%s)\n",jprint(array,0)); printf("unspents.(%s) %s\n",coinaddr,jprint(array,0));
if ( (m= cJSON_GetArraySize(array)) > 0 ) if ( (m= cJSON_GetArraySize(array)) > 0 )
{ {
for (j=0; j<m; j++) for (j=0; j<m; j++)

Loading…
Cancel
Save