Browse Source

Test

etomic
jl777 7 years ago
parent
commit
9089bd83d9
  1. 4
      iguana/exchanges/LP_transaction.c
  2. 6
      iguana/exchanges/LP_utxo.c

4
iguana/exchanges/LP_transaction.c

@ -1316,10 +1316,10 @@ char *LP_withdraw(struct iguana_info *coin,cJSON *argjson)
privkey = LP_privkey(vinaddr,coin->taddr);
maxV = LP_MAXVINS;
V = malloc(maxV * sizeof(*V));
if ( (ap= LP_address_utxo_reset(coin)) == 0 )
return(0);
for (iter=0; iter<2; iter++)
{
if ( (ap= LP_address_utxo_reset(coin)) == 0 )
return(0);
privkeys = cJSON_CreateArray();
vins = cJSON_CreateArray();
memset(V,0,sizeof(*V) * maxV);

6
iguana/exchanges/LP_utxo.c

@ -49,7 +49,7 @@ int32_t _LP_inuse_delete(bits256 txid,int32_t vout)
*lp = LP_inuse[--LP_numinuse];
lp->ind = ind;
memset(&LP_inuse[LP_numinuse],0,sizeof(struct LP_inuse_info));
printf("_LP_inuse_delete deleted %s/v%d find.%p\n",bits256_str(str,txid),vout,_LP_inuse_find(txid,vout));
//printf("_LP_inuse_delete deleted %s/v%d find.%p\n",bits256_str(str,txid),vout,_LP_inuse_find(txid,vout));
for (ind=0; ind<LP_numinuse; ind++)
if ( LP_inuse[ind].ind != ind )
printf("ind.%d of %d: mismatched ind.%d\n",ind,LP_numinuse,LP_inuse[ind].ind);
@ -274,7 +274,7 @@ int32_t LP_address_utxo_ptrs(struct iguana_info *coin,int32_t iambob,struct LP_a
//portable_mutex_lock(&LP_utxomutex);
DL_FOREACH_SAFE(ap->utxos,up,tmp)
{
char str[65]; printf("LP_address_utxo_ptrs %s n.%d %.8f %s v%d spendheight.%d allocated.%d\n",ap->coinaddr,n,dstr(up->U.value),bits256_str(str,up->U.txid),up->U.vout,up->spendheight,LP_allocated(up->U.txid,up->U.vout));
//char str[65]; printf("LP_address_utxo_ptrs %s n.%d %.8f %s v%d spendheight.%d allocated.%d\n",ap->coinaddr,n,dstr(up->U.value),bits256_str(str,up->U.txid),up->U.vout,up->spendheight,LP_allocated(up->U.txid,up->U.vout));
if ( up->spendheight <= 0 && LP_RTmetrics_avoidtxid(up->U.txid) < 0 )
{
if ( coin->electrum == 0 )
@ -316,7 +316,7 @@ int32_t LP_address_utxo_ptrs(struct iguana_info *coin,int32_t iambob,struct LP_a
utxos[n++] = up;
if ( n >= max )
break;
} else printf("LP_allocated skip %u\n",LP_allocated(up->U.txid,up->U.vout));
} //else printf("LP_allocated skip %u\n",LP_allocated(up->U.txid,up->U.vout));
}
else
{

Loading…
Cancel
Save