Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
82b53376d3
  1. 11
      basilisk/basilisk_swap.c
  2. 2
      iguana/iguana777.c

11
basilisk/basilisk_swap.c

@ -1038,7 +1038,7 @@ void basilisk_swaploop(void *_swap)
basilisk_waitchoosei(myinfo,swap,data,maxlen); // wait for choosei 0x08
if ( (swap->statebits & (0x08|0x02)) == (0x08|0x02) )
break;
sleep(3);
sleep(1);
}
while ( time(NULL) < swap->expiration )
{
@ -1049,10 +1049,8 @@ void basilisk_swaploop(void *_swap)
swap->statebits |= 0x20;
break;
}
sleep(3);
sleep(1);
}
while ( time(NULL) < swap->expiration )
{
printf("C r%u/q%u swapstate.%x\n",swap->req.requestid,swap->req.quoteid,swap->statebits);
if ( (swap->statebits & 0x40) == 0 ) // send fee
{
@ -1092,7 +1090,6 @@ void basilisk_swaploop(void *_swap)
{
printf("error bob generating deposit.%d or payment.%d\n",swap->bobdeposit.spendlen,swap->bobpayment.spendlen);
retval = -1;
break;
}
}
else
@ -1102,7 +1099,6 @@ void basilisk_swaploop(void *_swap)
{
printf("error alice generating payment.%d\n",swap->alicepayment.spendlen);
retval = -2;
break;
}
}
if ( basilisk_rawtx_gen("myfee",myinfo,swap->iambob,1,&swap->myfee,0,swap->myfee.spendscript,swap->myfee.spendlen,swap->myfee.coin->chain->txfee,1) == 0 )
@ -1111,12 +1107,9 @@ void basilisk_swaploop(void *_swap)
{
printf("error creating myfee\n");
retval = -3;
break;
}
}
}
sleep(3);
}
while ( retval == 0 && time(NULL) < swap->expiration )
{
printf("D r%u/q%u swapstate.%x otherstate.%x\n",swap->req.requestid,swap->req.quoteid,swap->statebits,swap->otherstatebits);

2
iguana/iguana777.c

@ -748,7 +748,7 @@ void iguana_coinloop(void *arg)
{
int32_t hdrsi,nonz,errs; struct iguana_pkhash *refP; struct iguana_bundle *bp;
hdrsi = (coin->RTheight / coin->chain->bundlesize) - 1;
if ( (bp= coin->bundles[hdrsi]) != 0 && bp->weights == 0 )
if ( 0 && (bp= coin->bundles[hdrsi]) != 0 && bp->weights == 0 )
bp->weights = iguana_PoS_weights(myinfo,coin,&refP,&bp->supply,&bp->numweights,&nonz,&errs,bp->bundleheight);
}
}

Loading…
Cancel
Save