Browse Source

Test

etomic
jl777 8 years ago
parent
commit
7be0ef62b0
  1. 2
      basilisk/basilisk_DEX.c
  2. 18
      crypto777/iguana_utils.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
}
}
}
mergesort(requests,m,sizeof(*requests),_cmp_requests);
heapsort(requests,m,sizeof(*requests),_cmp_requests);
*nump = m;
return(requests);
}

18
crypto777/iguana_utils.c

@ -585,31 +585,31 @@ static int _decreasing_uint32(const void *a,const void *b)
int32_t sortds(double *buf,uint32_t num,int32_t size)
{
mergesort(buf,num,size,_increasing_double);
heapsort(buf,num,size,_increasing_double);
return(0);
}
int32_t revsortds(double *buf,uint32_t num,int32_t size)
{
mergesort(buf,num,size,_decreasing_double);
heapsort(buf,num,size,_decreasing_double);
return(0);
}
int32_t sort64s(uint64_t *buf,uint32_t num,int32_t size)
{
mergesort(buf,num,size,_increasing_uint64);
heapsort(buf,num,size,_increasing_uint64);
return(0);
}
int32_t revsort64s(uint64_t *buf,uint32_t num,int32_t size)
{
mergesort(buf,num,size,_decreasing_uint64);
heapsort(buf,num,size,_decreasing_uint64);
return(0);
}
int32_t revsort32(uint32_t *buf,uint32_t num,int32_t size)
{
mergesort(buf,num,size,_decreasing_uint32);
heapsort(buf,num,size,_decreasing_uint32);
return(0);
}
@ -619,17 +619,17 @@ int32_t revsort32(uint32_t *buf,uint32_t num,int32_t size)
if ( dir > 0 )
{
if ( size == 32 )
mergesort(buf,num,structsize,_increasing_bits256);
heapsort(buf,num,structsize,_increasing_bits256);
else if ( size == 20 )
mergesort(buf,num,structsize,_increasing_rmd160);
heapsort(buf,num,structsize,_increasing_rmd160);
else retval = -1;
}
else
{
if ( size == 32 )
mergesort(buf,num,structsize,_decreasing_bits256);
heapsort(buf,num,structsize,_decreasing_bits256);
else if ( size == 20 )
mergesort(buf,num,structsize,_decreasing_rmd160);
heapsort(buf,num,structsize,_decreasing_rmd160);
else retval = -1;
}
if ( retval < 0 )

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)
{
mergesort(buf,num,size,_decreasing_double);
heapsort(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);
mergesort(sortbuf,num,sizeof(bits256),_bignum_cmp);
heapsort(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 )
mergesort(sortbuf,n,sizeof(*sortbuf)*2,_cmp_hashes);
heapsort(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 )
{
mergesort(&table[offsets[ind] * UTXOADDR_ITEMSIZE],counts[ind],UTXOADDR_ITEMSIZE,_utxoaddr_cmp);
heapsort(&table[offsets[ind] * UTXOADDR_ITEMSIZE],counts[ind],UTXOADDR_ITEMSIZE,_utxoaddr_cmp);
continue;
/*for (j=0; j<counts[ind]; j++)
{

Loading…
Cancel
Save