Browse Source

Test

etomic
jl777 8 years ago
parent
commit
87f3c78047
  1. 2
      iguana/exchanges/LP_swap.c
  2. 5
      iguana/exchanges/LP_transaction.c

2
iguana/exchanges/LP_swap.c

@ -487,7 +487,7 @@ uint32_t LP_swapdata_rawtxsend(int32_t pairsock,struct basilisk_swap *swap,uint3
rawtx->I.actualtxid = LP_broadcast_tx(rawtx->name,rawtx->coin->symbol,rawtx->txbytes,rawtx->I.datalen);
if ( bits256_cmp(rawtx->I.actualtxid,rawtx->I.signedtxid) != 0 )
{
printf("%s rawtxsend %s vs %s\n",rawtx->name,bits256_str(str,rawtx->I.signedtxid),bits256_str(str2,rawtx->I.actualtxid));
printf("%s rawtxsend.[%d] %s vs %s\n",rawtx->name,rawtx->I.datalen,bits256_str(str,rawtx->I.signedtxid),bits256_str(str2,rawtx->I.actualtxid));
rawtx->I.actualtxid = rawtx->I.signedtxid;
}
if ( bits256_nonz(rawtx->I.actualtxid) != 0 && msgbits != 0 )

5
iguana/exchanges/LP_transaction.c

@ -1401,8 +1401,11 @@ int32_t LP_rawtx_spendscript(struct basilisk_swap *swap,int32_t height,struct ba
int32_t datalen=0,retval=-1,hexlen,n; uint8_t *data; cJSON *txobj,*skey,*vouts,*vout; char *hexstr; bits256 txid;
datalen = recvbuf[0];
datalen += (int32_t)recvbuf[1] << 8;
if ( datalen > 65536 )
if ( datalen > 1024 )
{
printf("LP_rawtx_spendscript %s datalen.%d too big\n",rawtx->name,datalen);
return(-1);
}
rawtx->I.redeemlen = recvbuf[2];
data = &recvbuf[3];
if ( rawtx->I.redeemlen > 0 && rawtx->I.redeemlen < 0x100 )

Loading…
Cancel
Save