Browse Source

Test

etomic
jl777 7 years ago
parent
commit
aaf3b87668
  1. 2
      iguana/exchanges/LP_utxo.c
  2. 8
      iguana/exchanges/LP_utxos.c

2
iguana/exchanges/LP_utxo.c

@ -1089,7 +1089,7 @@ void LP_unspents_cache(char *symbol,char *addr,char *arraystr,int32_t updatedfla
{ {
char fname[1024]; FILE *fp=0; char fname[1024]; FILE *fp=0;
sprintf(fname,"%s/UNSPENTS/%s_%s",GLOBAL_DBDIR,symbol,addr), OS_portable_path(fname); sprintf(fname,"%s/UNSPENTS/%s_%s",GLOBAL_DBDIR,symbol,addr), OS_portable_path(fname);
printf("unspents cache.(%s) for %s %s, updated.%d\n",fname,symbol,addr,updatedflag); //printf("unspents cache.(%s) for %s %s, updated.%d\n",fname,symbol,addr,updatedflag);
if ( updatedflag == 0 && (fp= fopen(fname,"rb")) == 0 ) if ( updatedflag == 0 && (fp= fopen(fname,"rb")) == 0 )
updatedflag = 1; updatedflag = 1;
else if ( fp != 0 ) else if ( fp != 0 )

8
iguana/exchanges/LP_utxos.c

@ -548,9 +548,9 @@ int32_t LP_privkey_init(int32_t mypubsock,struct iguana_info *coin,bits256 mypri
//printf("array.%d\n",n); //printf("array.%d\n",n);
while ( used < n-1 ) while ( used < n-1 )
{ {
//for (i=0; i<n; i++) for (i=0; i<n; i++)
// printf("%.8f ",dstr(values[i])); printf("%.8f ",dstr(values[i]));
//printf("used.%d of n.%d\n",used,n); printf("used.%d of n.%d\n",used,n);
if ( (i= LP_maxvalue(values,n)) >= 0 ) if ( (i= LP_maxvalue(values,n)) >= 0 )
{ {
item = jitem(array,i); item = jitem(array,i);
@ -573,7 +573,7 @@ int32_t LP_privkey_init(int32_t mypubsock,struct iguana_info *coin,bits256 mypri
else targetval = (depositval / 9) * 8 + 2*txfee; else targetval = (depositval / 9) * 8 + 2*txfee;
if ( targetval < txfee*2 ) if ( targetval < txfee*2 )
targetval = txfee*2; targetval = txfee*2;
//printf("iambob.%d i.%d deposit %.8f min %.8f target %.8f\n",iambob,i,dstr(depositval),dstr((1+LP_MINSIZE_TXFEEMULT)*txfee),dstr(targetval)); printf("iambob.%d i.%d deposit %.8f min %.8f target %.8f\n",iambob,i,dstr(depositval),dstr((1+LP_MINSIZE_TXFEEMULT)*txfee),dstr(targetval));
if ( depositval < (1+LP_MINSIZE_TXFEEMULT)*txfee ) if ( depositval < (1+LP_MINSIZE_TXFEEMULT)*txfee )
continue; continue;
i = -1; i = -1;

Loading…
Cancel
Save