jl777 7 years ago
parent
commit
fdc370461f
  1. 2
      iguana/exchanges/LP_ordermatch.c
  2. 7
      iguana/exchanges/LP_swap.c
  3. 4
      iguana/exchanges/LP_transaction.c

2
iguana/exchanges/LP_ordermatch.c

@ -686,7 +686,7 @@ char *LP_connectedalice(cJSON *argjson) // alice
printf("cant find autxo\n");
return(clonestr("{\"error\":\"cant find autxo\"}"));
}
LP_abutxo_set(autxo,0,&Q);
//LP_abutxo_set(autxo,0,&Q);
if ( (butxo= LP_utxopairfind(1,Q.txid,Q.vout,Q.txid2,Q.vout2)) == 0 )
{
value = LP_txvalue(Q.coinaddr,Q.srccoin,Q.txid,Q.vout);

7
iguana/exchanges/LP_swap.c

@ -412,10 +412,10 @@ int32_t LP_waitfor(int32_t pairsock,struct basilisk_swap *swap,int32_t timeout,i
pfd.events = NN_POLLIN;
if ( nn_poll(&pfd,1,1) > 0 )
{
//printf("start wait\n");
printf("start wait\n");
if ( (datalen= nn_recv(pairsock,&data,NN_MSG,0)) >= 0 )
{
//printf("wait for got.%d\n",datalen);
printf("wait for got.%d\n",datalen);
retval = (*verify)(swap,data,datalen);
nn_freemsg(data);
//printf("retval.%d\n",retval);
@ -827,7 +827,8 @@ void LP_aliceloop(void *_swap)
swap->N.pair = -1;
}
basilisk_swap_finished(swap);
free(swap);
printf("finish swap.%p\n",swap);
//free(swap);
G.LP_pendingswaps--;
}

4
iguana/exchanges/LP_transaction.c

@ -1329,12 +1329,12 @@ int32_t LP_verify_bobdeposit(struct basilisk_swap *swap,uint8_t *data,int32_t da
strcpy(swap->bobdeposit.I.destaddr,swap->bobdeposit.p2shaddr);
basilisk_dontforget_update(swap,&swap->bobdeposit);
//LP_importaddress(swap->bobcoin.symbol,swap->bobdeposit.I.destaddr);
/*for (i=0; i<swap->bobdeposit.I.datalen; i++)
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);*/
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);

Loading…
Cancel
Save