|
|
@ -178,7 +178,7 @@ struct LP_address_utxo *LP_address_utxofind(struct iguana_info *coin,char *coina |
|
|
|
return(0); |
|
|
|
} |
|
|
|
|
|
|
|
int32_t LP_address_utxoadd(struct iguana_info *coin,char *coinaddr,bits256 txid,int32_t vout,uint64_t value,int32_t height,int32_t spendheight) |
|
|
|
int32_t LP_address_utxoadd(char *debug,struct iguana_info *coin,char *coinaddr,bits256 txid,int32_t vout,uint64_t value,int32_t height,int32_t spendheight) |
|
|
|
{ |
|
|
|
struct LP_address *ap; cJSON *txobj; struct LP_address_utxo *up,*tmp; int32_t flag,retval = 0; char str[65]; |
|
|
|
if ( coin == 0 ) |
|
|
@ -226,7 +226,7 @@ int32_t LP_address_utxoadd(struct iguana_info *coin,char *coinaddr,bits256 txid, |
|
|
|
portable_mutex_unlock(&coin->addrmutex); |
|
|
|
retval = 1; |
|
|
|
if ( value == 0 ) |
|
|
|
printf("null? ADD UTXO >> %s %s %s/v%d ht.%d %.8f\n",coin->symbol,coinaddr,bits256_str(str,txid),vout,height,dstr(value)); |
|
|
|
printf("%s null? ADD UTXO >> %s %s %s/v%d ht.%d %.8f\n",debug,coin->symbol,coinaddr,bits256_str(str,txid),vout,height,dstr(value)); |
|
|
|
} |
|
|
|
} // else printf("cant get ap %s %s\n",coin->symbol,coinaddr);
|
|
|
|
//printf("done %s add addr.%s ht.%d\n",coin->symbol,coinaddr,height);
|
|
|
@ -446,7 +446,7 @@ int32_t LP_unspents_array(struct iguana_info *coin,char *coinaddr,cJSON *array) |
|
|
|
if ( errs == 0 ) |
|
|
|
{ |
|
|
|
//printf("from LP_unspents_array\n");
|
|
|
|
LP_address_utxoadd(coin,coinaddr,txid,v,val,height,-1); |
|
|
|
LP_address_utxoadd("LP_unspents_array",coin,coinaddr,txid,v,val,height,-1); |
|
|
|
count++; |
|
|
|
} |
|
|
|
} |
|
|
@ -570,7 +570,7 @@ cJSON *LP_transactioninit(struct iguana_info *coin,bits256 txid,int32_t iter,cJS |
|
|
|
tx->outpoints[i].interest = SATOSHIDEN * jdouble(vout,"interest"); |
|
|
|
LP_destaddr(tx->outpoints[i].coinaddr,vout); |
|
|
|
printf("from transaction init %s %s %s/v%d <- %.8f\n",coin->symbol,tx->outpoints[i].coinaddr,bits256_str(str,txid),i,dstr(tx->outpoints[i].value)); |
|
|
|
//LP_address_utxoadd(coin,tx->outpoints[i].coinaddr,txid,i,tx->outpoints[i].value,height,-1);
|
|
|
|
LP_address_utxoadd("LP_transactioninit iter0",coin,tx->outpoints[i].coinaddr,txid,i,tx->outpoints[i].value,height,-1); |
|
|
|
} |
|
|
|
//printf("numvouts.%d\n",numvouts);
|
|
|
|
} |
|
|
@ -592,7 +592,7 @@ cJSON *LP_transactioninit(struct iguana_info *coin,bits256 txid,int32_t iter,cJS |
|
|
|
tx->outpoints[spentvout].spendtxid = txid; |
|
|
|
tx->outpoints[spentvout].spendvini = i; |
|
|
|
tx->outpoints[spentvout].spendheight = height > 0 ? height : 1; |
|
|
|
LP_address_utxoadd(coin,tx->outpoints[spentvout].coinaddr,spenttxid,spentvout,tx->outpoints[spentvout].value,-1,height>0?height:1); |
|
|
|
LP_address_utxoadd("LP_transactioninit iter1",coin,tx->outpoints[spentvout].coinaddr,spenttxid,spentvout,tx->outpoints[spentvout].value,-1,height>0?height:1); |
|
|
|
if ( 0 && strcmp(coin->symbol,"REVS") == 0 ) |
|
|
|
printf("spend %s %s/v%d at ht.%d\n",coin->symbol,bits256_str(str,tx->txid),spentvout,height); |
|
|
|
} |
|
|
|