Browse Source

Test

etomic
jl777 8 years ago
parent
commit
71339b69b3
  1. 2
      iguana/exchanges/LP_swap.c
  2. 11
      iguana/exchanges/LP_transaction.c

2
iguana/exchanges/LP_swap.c

@ -501,7 +501,7 @@ uint32_t LP_swapdata_rawtxsend(int32_t pairsock,struct basilisk_swap *swap,uint3
sendbuf[sendlen++] = rawtx->I.datalen & 0xff; sendbuf[sendlen++] = rawtx->I.datalen & 0xff;
sendbuf[sendlen++] = (rawtx->I.datalen >> 8) & 0xff; sendbuf[sendlen++] = (rawtx->I.datalen >> 8) & 0xff;
sendbuf[sendlen++] = rawtx->I.redeemlen; sendbuf[sendlen++] = rawtx->I.redeemlen;
int32_t z; for (z=0; z<rawtx->I.datalen; z++) printf("%02x",rawtx->txbytes[z]); printf(" >>>>>>> send %s\n",rawtx->name); int32_t z; for (z=0; z<rawtx->I.datalen; z++) printf("%02x",rawtx->txbytes[z]); printf(" >>>>>>> send.%d %s\n",rawtx->I.datalen,rawtx->name);
//printf("datalen.%d redeemlen.%d\n",rawtx->I.datalen,rawtx->I.redeemlen); //printf("datalen.%d redeemlen.%d\n",rawtx->I.datalen,rawtx->I.redeemlen);
memcpy(&sendbuf[sendlen],rawtx->txbytes,rawtx->I.datalen), sendlen += rawtx->I.datalen; memcpy(&sendbuf[sendlen],rawtx->txbytes,rawtx->I.datalen), sendlen += rawtx->I.datalen;
if ( rawtx->I.redeemlen > 0 && rawtx->I.redeemlen < 0x100 ) if ( rawtx->I.redeemlen > 0 && rawtx->I.redeemlen < 0x100 )

11
iguana/exchanges/LP_transaction.c

@ -48,15 +48,14 @@ bits256 LP_broadcast_tx(char *name,char *symbol,uint8_t *data,int32_t datalen)
if ( data != 0 && datalen != 0 ) if ( data != 0 && datalen != 0 )
{ {
char str[65]; char str[65];
#ifdef BASILISK_DISABLESENDTX
txid = bits256_doublesha256(0,data,datalen);
printf("%s <- dont sendrawtransaction (%s)\n",name,bits256_str(str,txid));
return(txid);
#endif
signedtx = malloc(datalen*2 + 1); signedtx = malloc(datalen*2 + 1);
init_hexbytes_noT(signedtx,data,datalen); init_hexbytes_noT(signedtx,data,datalen);
#ifdef BASILISK_DISABLESENDTX
txid = bits256_doublesha256(0,data,datalen);
printf("%s <- dont sendrawtransaction (%s) %s\n",name,bits256_str(str,txid),signedtx);
#else
txid = LP_broadcast(name,symbol,signedtx); txid = LP_broadcast(name,symbol,signedtx);
// sent to nn_socket! #endif
free(signedtx); free(signedtx);
} }
return(txid); return(txid);

Loading…
Cancel
Save