|
@ -1367,12 +1367,12 @@ int32_t LP_verify_bobdeposit(struct basilisk_swap *swap,uint8_t *data,int32_t da |
|
|
swap->aliceclaim.utxotxid = swap->bobdeposit.I.signedtxid = LP_broadcast_tx(swap->bobdeposit.name,swap->bobcoin.symbol,swap->bobdeposit.txbytes,swap->bobdeposit.I.datalen); |
|
|
swap->aliceclaim.utxotxid = swap->bobdeposit.I.signedtxid = LP_broadcast_tx(swap->bobdeposit.name,swap->bobcoin.symbol,swap->bobdeposit.txbytes,swap->bobdeposit.I.datalen); |
|
|
if ( bits256_nonz(swap->bobdeposit.I.signedtxid) != 0 ) |
|
|
if ( bits256_nonz(swap->bobdeposit.I.signedtxid) != 0 ) |
|
|
swap->depositunconf = 1; |
|
|
swap->depositunconf = 1; |
|
|
basilisk_dontforget_update(swap,&swap->bobdeposit); |
|
|
|
|
|
len = basilisk_swapuserdata(userdata,zero,1,swap->I.myprivs[0],swap->bobdeposit.redeemscript,swap->bobdeposit.I.redeemlen); |
|
|
len = basilisk_swapuserdata(userdata,zero,1,swap->I.myprivs[0],swap->bobdeposit.redeemscript,swap->bobdeposit.I.redeemlen); |
|
|
memcpy(swap->I.userdata_aliceclaim,userdata,len); |
|
|
memcpy(swap->I.userdata_aliceclaim,userdata,len); |
|
|
swap->I.userdata_aliceclaimlen = len; |
|
|
swap->I.userdata_aliceclaimlen = len; |
|
|
bitcoin_address(swap->bobdeposit.p2shaddr,swap->bobcoin.taddr,swap->bobcoin.p2shtype,swap->bobdeposit.redeemscript,swap->bobdeposit.I.redeemlen); |
|
|
bitcoin_address(swap->bobdeposit.p2shaddr,swap->bobcoin.taddr,swap->bobcoin.p2shtype,swap->bobdeposit.redeemscript,swap->bobdeposit.I.redeemlen); |
|
|
strcpy(swap->bobdeposit.I.destaddr,swap->bobdeposit.p2shaddr); |
|
|
strcpy(swap->bobdeposit.I.destaddr,swap->bobdeposit.p2shaddr); |
|
|
|
|
|
basilisk_dontforget_update(swap,&swap->bobdeposit); |
|
|
//LP_importaddress(swap->bobcoin.symbol,swap->bobdeposit.I.destaddr);
|
|
|
//LP_importaddress(swap->bobcoin.symbol,swap->bobdeposit.I.destaddr);
|
|
|
/*for (i=0; i<swap->bobdeposit.I.datalen; i++)
|
|
|
/*for (i=0; i<swap->bobdeposit.I.datalen; i++)
|
|
|
printf("%02x",swap->bobdeposit.txbytes[i]); |
|
|
printf("%02x",swap->bobdeposit.txbytes[i]); |
|
@ -1431,12 +1431,12 @@ int32_t LP_verify_bobpayment(struct basilisk_swap *swap,uint8_t *data,int32_t da |
|
|
swap->alicespend.utxotxid = swap->bobpayment.I.signedtxid = LP_broadcast_tx(swap->bobpayment.name,swap->bobpayment.coin->symbol,swap->bobpayment.txbytes,swap->bobpayment.I.datalen); |
|
|
swap->alicespend.utxotxid = swap->bobpayment.I.signedtxid = LP_broadcast_tx(swap->bobpayment.name,swap->bobpayment.coin->symbol,swap->bobpayment.txbytes,swap->bobpayment.I.datalen); |
|
|
if ( bits256_nonz(swap->bobpayment.I.signedtxid) != 0 ) |
|
|
if ( bits256_nonz(swap->bobpayment.I.signedtxid) != 0 ) |
|
|
swap->paymentunconf = 1; |
|
|
swap->paymentunconf = 1; |
|
|
basilisk_dontforget_update(swap,&swap->bobpayment); |
|
|
|
|
|
for (i=0; i<32; i++) |
|
|
for (i=0; i<32; i++) |
|
|
revAm.bytes[i] = swap->I.privAm.bytes[31-i]; |
|
|
revAm.bytes[i] = swap->I.privAm.bytes[31-i]; |
|
|
len = basilisk_swapuserdata(userdata,revAm,0,swap->I.myprivs[0],swap->bobpayment.redeemscript,swap->bobpayment.I.redeemlen); |
|
|
len = basilisk_swapuserdata(userdata,revAm,0,swap->I.myprivs[0],swap->bobpayment.redeemscript,swap->bobpayment.I.redeemlen); |
|
|
bitcoin_address(swap->bobpayment.p2shaddr,swap->bobcoin.taddr,swap->bobcoin.p2shtype,swap->bobpayment.redeemscript,swap->bobpayment.I.redeemlen); |
|
|
bitcoin_address(swap->bobpayment.p2shaddr,swap->bobcoin.taddr,swap->bobcoin.p2shtype,swap->bobpayment.redeemscript,swap->bobpayment.I.redeemlen); |
|
|
strcpy(swap->bobpayment.I.destaddr,swap->bobpayment.p2shaddr); |
|
|
strcpy(swap->bobpayment.I.destaddr,swap->bobpayment.p2shaddr); |
|
|
|
|
|
basilisk_dontforget_update(swap,&swap->bobpayment); |
|
|
//LP_importaddress(swap->bobcoin.symbol,swap->bobpayment.I.destaddr);
|
|
|
//LP_importaddress(swap->bobcoin.symbol,swap->bobpayment.I.destaddr);
|
|
|
/*for (i=0; i<swap->bobpayment.I.datalen; i++)
|
|
|
/*for (i=0; i<swap->bobpayment.I.datalen; i++)
|
|
|
printf("%02x",swap->bobpayment.txbytes[i]); |
|
|
printf("%02x",swap->bobpayment.txbytes[i]); |
|
|