Browse Source

Test

etomic
jl777 8 years ago
parent
commit
30ba915e3c
  1. 2
      .gitignore
  2. 8
      basilisk/basilisk_swap.c
  3. 4
      iguana/iguana_payments.c

2
.gitignore

@ -200,3 +200,5 @@ iguana/DB/SWAPS/1268007736-526212866
iguana/DB/SWAPS/3111936786-3185288772
iguana/DB/SWAPS/3368214189-2405641584
iguana/DB/SWAPS/1133671270-1840176506

8
basilisk/basilisk_swap.c

@ -948,7 +948,7 @@ int32_t basilisk_bobscripts_set(struct supernet_info *myinfo,struct basilisk_swa
}
}
}
return(0);
return(-1);
}
else
{
@ -981,7 +981,7 @@ int32_t basilisk_bobscripts_set(struct supernet_info *myinfo,struct basilisk_swa
}
}
}
return(0);
return(-1);
//for (i=0; i<swap->bobdeposit.redeemlen; i++)
// printf("%02x",swap->bobdeposit.redeemscript[i]);
//printf(" <- bobdeposit.%d\n",i);
@ -2401,6 +2401,10 @@ void basilisk_swaploop(void *_swap)
}
}
}
if ( swap->I.iambob == 0 && (swap->myfee.I.datalen == 0 || swap->alicepayment.I.datalen == 0 || swap->alicepayment.I.datalen == 0) )
retval = -7;
else if ( swap->I.iambob != 0 && (swap->myfee.I.datalen == 0 || swap->bobpayment.I.datalen == 0 || swap->bobdeposit.I.datalen == 0) )
retval = -7;
while ( retval == 0 && basilisk_swapiteration(myinfo,swap,data,maxlen) == 0 )
{
sleep(DEX_SLEEP);

4
iguana/iguana_payments.c

@ -175,7 +175,7 @@ int32_t iguana_RTbestunspent(struct supernet_info *myinfo,struct iguana_info *co
}
if ( iguana_RTunspent_check(myinfo,coin,unspents[i]) != 0 )
{
printf("(%d u%d) %.8f already used\n",unspents[i].hdrsi,unspents[i].unspentind,dstr(atx_value));
//printf("(%d u%d) %.8f already used\n",unspents[i].hdrsi,unspents[i].unspentind,dstr(atx_value));
continue;
}
if ( maxmode == 0 )
@ -441,7 +441,7 @@ char *iguana_calcrawtx(struct supernet_info *myinfo,struct iguana_info *coin,cJS
}
unspents = realloc(unspents,(1 + max) * sizeof(*unspents));
value = jdouble(item,"amount") * SATOSHIDEN;
if ( jdouble(item,"interest") != 0 )
if ( (0) && jdouble(item,"interest") != 0 )
printf("utxo has interest of %.8f\n",jdouble(item,"interest"));
iguana_outptset(myinfo,coin,&unspents[max++],jbits256(item,"txid"),jint(item,"vout"),value,spendscriptstr);
avail += value;

Loading…
Cancel
Save