Browse Source

Test

etomic
jl777 8 years ago
parent
commit
a9bce5b3c6
  1. 1
      iguana/exchanges/LP_nativeDEX.c
  2. 2
      iguana/exchanges/LP_swap.c
  3. 2
      iguana/exchanges/LP_transaction.c

1
iguana/exchanges/LP_nativeDEX.c

@ -19,6 +19,7 @@
// marketmaker
//
// dPoW security -> 4: KMD notarized, 5: BTC notarized
// locktime to fee
// new testchain
// sign critical api calls (pubkey reg, listunspent, orders?)
// process stats.log local file -> map of realtime activity!

2
iguana/exchanges/LP_swap.c

@ -1097,6 +1097,8 @@ struct basilisk_swap *bitcoin_swapinit(bits256 privkey,uint8_t *pubkey33,bits256
basilisk_rawtx_setparms("myfee",swap->I.req.quoteid,&swap->myfee,&swap->alicecoin,0,0,LP_DEXFEE(swap->I.alicesatoshis) + swap->alicecoin.txfee,0,0,jumblrflag);
alicepub33 = pubkey33;
}
swap->myfee.I.locktime = swap->I.started + 1;
swap->otherfee.I.locktime = swap->I.started + 1;
basilisk_rawtx_setparms("bobdeposit",swap->I.req.quoteid,&swap->bobdeposit,&swap->bobcoin,swap->I.bobconfirms,0,LP_DEPOSITSATOSHIS(swap->I.bobsatoshis) + swap->bobcoin.txfee,4,0,jumblrflag);
basilisk_rawtx_setparms("bobrefund",swap->I.req.quoteid,&swap->bobrefund,&swap->bobcoin,1,4,LP_DEPOSITSATOSHIS(swap->I.bobsatoshis),1,bobpub33,jumblrflag);
swap->bobrefund.I.suppress_pubkeys = 1;

2
iguana/exchanges/LP_transaction.c

@ -1630,7 +1630,7 @@ int32_t LP_verify_otherfee(struct basilisk_swap *swap,uint8_t *data,int32_t data
{
if ( LP_rawtx_spendscript(swap,swap->bobcoin.longestchain,&swap->otherfee,0,data,datalen,0) == 0 )
{
printf("otherfee amount %.8f -> %s vs %s\n",dstr(swap->otherfee.I.amount),swap->otherfee.p2shaddr,swap->otherfee.I.destaddr);
printf("otherfee amount %.8f -> %s vs %s locktime %u vs %u\n",dstr(swap->otherfee.I.amount),swap->otherfee.p2shaddr,swap->otherfee.I.destaddr,swap->otherfee.I.locktime,swap->I.started+1);
if ( strcmp(swap->otherfee.I.destaddr,swap->otherfee.p2shaddr) == 0 )
{
printf("dexfee verified\n");

Loading…
Cancel
Save