|
|
@ -1554,10 +1554,9 @@ int32_t basilisk_bobscripts_set(struct basilisk_swap *swap,int32_t depositflag,i |
|
|
|
swap->bobdeposit.I.spendlen = basilisk_bobscript(swap->bobdeposit.I.rmd160,swap->bobdeposit.redeemscript,&swap->bobdeposit.I.redeemlen,swap->bobdeposit.spendscript,0,&swap->bobdeposit.I.locktime,&swap->bobdeposit.I.secretstart,&swap->I,1); |
|
|
|
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); |
|
|
|
//LP_importaddress(swap->bobcoin.symbol,swap->bobdeposit.I.destaddr);
|
|
|
|
int32_t i; for (i=0; i<swap->bobdeposit.I.redeemlen; i++) |
|
|
|
printf("%02x",swap->bobdeposit.redeemscript[i]); |
|
|
|
printf(" <- bobdeposit redeem %d %s\n",i,swap->bobdeposit.I.destaddr); |
|
|
|
//int32_t i; for (i=0; i<swap->bobdeposit.I.redeemlen; i++)
|
|
|
|
// printf("%02x",swap->bobdeposit.redeemscript[i]);
|
|
|
|
//printf(" <- bobdeposit redeem %d %s\n",i,swap->bobdeposit.I.destaddr);
|
|
|
|
if ( genflag != 0 && (swap->bobdeposit.I.datalen == 0 || swap->bobrefund.I.datalen == 0) ) |
|
|
|
{ |
|
|
|
basilisk_rawtx_gen(swap->ctx,"deposit",swap->I.started,swap->persistent_pubkey33,1,1,&swap->bobdeposit,swap->bobdeposit.I.locktime,swap->bobdeposit.spendscript,swap->bobdeposit.I.spendlen,swap->bobdeposit.coin->txfee,1,0,swap->persistent_privkey,swap->changermd160,coinaddr); |
|
|
@ -1734,13 +1733,12 @@ int32_t LP_verify_bobdeposit(struct basilisk_swap *swap,uint8_t *data,int32_t da |
|
|
|
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); |
|
|
|
basilisk_dontforget_update(swap,&swap->bobdeposit); |
|
|
|
//LP_importaddress(swap->bobcoin.symbol,swap->bobdeposit.I.destaddr);
|
|
|
|
int32_t i; char str[65]; for (i=0; i<swap->bobdeposit.I.datalen; i++) |
|
|
|
printf("%02x",swap->bobdeposit.txbytes[i]); |
|
|
|
printf(" <- bobdeposit.%d %s\n",swap->bobdeposit.I.datalen,bits256_str(str,swap->bobdeposit.I.signedtxid)); |
|
|
|
for (i=0; i<swap->bobdeposit.I.redeemlen; i++) |
|
|
|
printf("%02x",swap->bobdeposit.redeemscript[i]); |
|
|
|
printf(" <- bobdeposit redeem %d %s suppress.%d\n",i,swap->bobdeposit.I.destaddr,swap->aliceclaim.I.suppress_pubkeys); |
|
|
|
//int32_t i; char str[65]; for (i=0; i<swap->bobdeposit.I.datalen; i++)
|
|
|
|
// printf("%02x",swap->bobdeposit.txbytes[i]);
|
|
|
|
//printf(" <- bobdeposit.%d %s\n",swap->bobdeposit.I.datalen,bits256_str(str,swap->bobdeposit.I.signedtxid));
|
|
|
|
//for (i=0; i<swap->bobdeposit.I.redeemlen; i++)
|
|
|
|
// printf("%02x",swap->bobdeposit.redeemscript[i]);
|
|
|
|
//printf(" <- bobdeposit redeem %d %s suppress.%d\n",i,swap->bobdeposit.I.destaddr,swap->aliceclaim.I.suppress_pubkeys);
|
|
|
|
memcpy(swap->aliceclaim.redeemscript,swap->bobdeposit.redeemscript,swap->bobdeposit.I.redeemlen); |
|
|
|
swap->aliceclaim.I.redeemlen = swap->bobdeposit.I.redeemlen; |
|
|
|
memcpy(swap->aliceclaim.I.pubkey33,swap->persistent_pubkey33,33); |
|
|
|