Browse Source

Test

patch-3
jl777 7 years ago
parent
commit
cac6ae60c0
  1. 15
      iguana/exchanges/LP_remember.c

15
iguana/exchanges/LP_remember.c

@ -1254,14 +1254,15 @@ cJSON *basilisk_remember(int64_t *KMDtotals,int64_t *BTCtotals,uint32_t requesti
} else printf("%p Dredeemscript missing\n",rswap.Dredeemscript);*/ } else printf("%p Dredeemscript missing\n",rswap.Dredeemscript);*/
if ( redeemlen > 0 ) if ( redeemlen > 0 )
{ {
//memset(revAm.bytes,0,sizeof(revAm)); memset(revAm.bytes,0,sizeof(revAm));
//for (i=0; i<32; i++) for (i=0; i<32; i++)
// revAm.bytes[i] = rswap.privAm.bytes[31-i]; revAm.bytes[i] = rswap.privAm.bytes[31-i];
len = basilisk_swapuserdata(userdata,rswap.privAm,1,rswap.myprivs[0],redeemscript,redeemlen); len = basilisk_swapuserdata(userdata,revAm,1,rswap.myprivs[0],redeemscript,redeemlen);
if ( (rswap.txbytes[BASILISK_ALICECLAIM]= basilisk_swap_bobtxspend(&signedtxid,rswap.Btxfee,"aliceclaim",rswap.bobcoin,bob->wiftaddr,bob->taddr,bob->pubtype,bob->p2shtype,bob->isPoS,bob->wiftype,ctx,rswap.myprivs[0],0,redeemscript,redeemlen,userdata,len,rswap.txids[BASILISK_BOBDEPOSIT],0,0,rswap.pubkey33,0,claimtime,&rswap.values[BASILISK_ALICECLAIM],0,0,rswap.bobdepositaddr,1,bob->zcash)) != 0 ) if ( (rswap.txbytes[BASILISK_ALICECLAIM]= basilisk_swap_bobtxspend(&signedtxid,rswap.Btxfee,"aliceclaim",rswap.bobcoin,bob->wiftaddr,bob->taddr,bob->pubtype,bob->p2shtype,bob->isPoS,bob->wiftype,ctx,rswap.myprivs[0],0,redeemscript,redeemlen,userdata,len,rswap.txids[BASILISK_BOBDEPOSIT],0,0,rswap.pubkey33,0,rswap.dlocktime+777,&rswap.values[BASILISK_ALICECLAIM],0,0,rswap.bobdepositaddr,1,bob->zcash)) != 0 )
{ {
printf("claimtime.%u aliceclaim.(%s)\n", claimtime, rswap.txbytes[BASILISK_ALICECLAIM]); printf("dlocktime.%u claimtime.%u aliceclaim.(%s)\n",rswap.dlocktime,claimtime,rswap.txbytes[BASILISK_ALICECLAIM]);
if (rswap.bobtomic[0] != 0) { if ( rswap.bobtomic[0] != 0 )
{
char *aliceClaimsEthTxId = LP_etomicalice_claims_bob_deposit(&rswap); char *aliceClaimsEthTxId = LP_etomicalice_claims_bob_deposit(&rswap);
free(aliceClaimsEthTxId); free(aliceClaimsEthTxId);
} }

Loading…
Cancel
Save