Browse Source

Test

etomic
jl777 7 years ago
parent
commit
b57f24fa54
  1. 2
      basilisk/basilisk_DEX.c
  2. 8
      iguana/exchanges/LP_transaction.c
  3. 2
      iguana/iguana_bundles.c
  4. 2
      iguana/iguana_txidfind.c
  5. 4
      iguana/iguana_unspents.c

2
basilisk/basilisk_DEX.c

@ -418,7 +418,7 @@ struct basilisk_request *_basilisk_requests_uniq(struct supernet_info *myinfo,in
}
}
}
heapsort(requests,m,sizeof(*requests),_cmp_requests);
qsort(requests,m,sizeof(*requests),_cmp_requests);
*nump = m;
return(requests);
}

8
iguana/exchanges/LP_transaction.c

@ -847,6 +847,7 @@ int32_t basilisk_swap_getsigscript(char *symbol,uint8_t *script,int32_t maxlen,b
return(scriptlen);
}
#ifdef notnow
bits256 _LP_swap_spendtxid(char *symbol,char *destaddr,char *coinaddr,bits256 utxotxid,int32_t vout)
{
char *retstr,*addr; cJSON *array,*item,*array2; int32_t i,n,m; bits256 spendtxid,txid;
@ -899,6 +900,7 @@ bits256 _LP_swap_spendtxid(char *symbol,char *destaddr,char *coinaddr,bits256 ut
}
return(spendtxid);
}
#endif
bits256 LP_swap_spendtxid(char *symbol,char *destaddr,bits256 utxotxid,int32_t vout)
{
@ -911,12 +913,12 @@ bits256 LP_swap_spendtxid(char *symbol,char *destaddr,bits256 utxotxid,int32_t v
printf("spend of %s/v%d detected\n",bits256_str(str,utxotxid),vout);
return(spendtxid);
//char str[65]; printf("swap %s spendtxid.(%s)\n",symbol,bits256_str(str,utxotxid));
if ( 0 && strcmp("BTC",symbol) == 0 )
if ( (0) && strcmp("BTC",symbol) == 0 )
{
//[{"type":"sent","confirmations":379,"height":275311,"timestamp":1492084664,"txid":"8703c5517bc57db38134058370a14e99b8e662b99ccefa2061dea311bbd02b8b","vout":0,"amount":117.50945263,"spendtxid":"cf2509e076fbb9b22514923df916b7aacb1391dce9c7e1460b74947077b12510","vin":0,"paid":{"type":"paid","txid":"cf2509e076fbb9b22514923df916b7aacb1391dce9c7e1460b74947077b12510","height":275663,"timestamp":1492106024,"vouts":[{"RUDpN6PEBsE7ZFbGjUxk1W3QVsxnjBLYw6":117.50935263}]}}]
LP_swap_getcoinaddr(symbol,coinaddr,utxotxid,vout);
/*LP_swap_getcoinaddr(symbol,coinaddr,utxotxid,vout);
if ( coinaddr[0] != 0 )
spendtxid = _LP_swap_spendtxid(symbol,destaddr,coinaddr,utxotxid,vout);
spendtxid = _LP_swap_spendtxid(symbol,destaddr,coinaddr,utxotxid,vout);*/
}
else
{

2
iguana/iguana_bundles.c

@ -1173,7 +1173,7 @@ int32_t iguana_bundleiters(struct supernet_info *myinfo,struct iguana_info *coin
static int32_t revsortds(double *buf,uint32_t num,int32_t size)
{
heapsort(buf,num,size,_decreasing_double);
qsort(buf,num,size,_decreasing_double);
return(0);
}*/

2
iguana/iguana_txidfind.c

@ -563,7 +563,7 @@ int64_t iguana_fastfindcreate(struct iguana_info *coin)
{
OS_removefile(fname,0);
num = (int32_t)allocsize/sizeof(bits256);
heapsort(sortbuf,num,sizeof(bits256),_bignum_cmp);
qsort(sortbuf,num,sizeof(bits256),_bignum_cmp);
strcat(fname,".all");
if ( (coin->fastfps[i]= fopen(fname,"wb")) != 0 )
{

4
iguana/iguana_unspents.c

@ -853,7 +853,7 @@ int32_t iguana_staker_sort(struct iguana_info *coin,bits256 *hash2p,uint8_t *ref
}
}
if ( n > 0 )
heapsort(sortbuf,n,sizeof(*sortbuf)*2,_cmp_hashes);
qsort(sortbuf,n,sizeof(*sortbuf)*2,_cmp_hashes);
vcalc_sha256cat(hash2p->bytes,refhash2.bytes,sizeof(refhash2),sortbuf[1].bytes,20);
memcpy(refrmd160,sortbuf[1].bytes,20);
{
@ -1730,7 +1730,7 @@ uint64_t iguana_utxoaddr_gen(struct supernet_info *myinfo,struct iguana_info *co
{
if ( counts[ind] > 0 )
{
heapsort(&table[offsets[ind] * UTXOADDR_ITEMSIZE],counts[ind],UTXOADDR_ITEMSIZE,_utxoaddr_cmp);
qsort(&table[offsets[ind] * UTXOADDR_ITEMSIZE],counts[ind],UTXOADDR_ITEMSIZE,_utxoaddr_cmp);
continue;
/*for (j=0; j<counts[ind]; j++)
{

Loading…
Cancel
Save