Browse Source

Test

etomic
jl777 7 years ago
parent
commit
e66a42da1b
  1. 4
      iguana/exchanges/LP_nativeDEX.c
  2. 6
      iguana/exchanges/LP_utxo.c

4
iguana/exchanges/LP_nativeDEX.c

@ -515,8 +515,8 @@ void LP_coinsloop(void *_coins)
{
if ( (backupep= ep->prev) == 0 )
backupep = ep;
//HASH_ITER(hh,coin->addresses,ap,atmp)
if ( (ap= LP_addressfind(coin,coin->smartaddr)) != 0 )
HASH_ITER(hh,coin->addresses,ap,atmp)
//if ( (ap= LP_addressfind(coin,coin->smartaddr)) != 0 )
{
DL_FOREACH_SAFE(ap->utxos,up,tmp)
{

6
iguana/exchanges/LP_utxo.c

@ -237,7 +237,7 @@ void LP_mark_spent(char *symbol,bits256 txid,int32_t vout)
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_transaction *tx; struct LP_address_utxo *up,*tmp; int32_t flag,retval = 0; char str[65];
struct LP_address *ap; cJSON *txobj; struct LP_transaction *tx; struct LP_address_utxo *up,*tmp; int32_t flag,retval = 0; //char str[65];
if ( coin == 0 )
return(0);
if ( spendheight > 0 ) // dont autocreate entries for spends we dont care about
@ -532,13 +532,15 @@ struct LP_transaction *LP_transactionfind(struct iguana_info *coin,bits256 txid)
struct LP_transaction *LP_transactionadd(struct iguana_info *coin,bits256 txid,int32_t height,int32_t numvouts,int32_t numvins)
{
static long totalsize;
struct LP_transaction *tx; int32_t i;
if ( (tx= LP_transactionfind(coin,txid)) == 0 )
{
//char str[65]; printf("%s ht.%d u.%u NEW TXID.(%s) vouts.[%d]\n",coin->symbol,height,timestamp,bits256_str(str,txid),numvouts);
//if ( bits256_nonz(txid) == 0 && tx->height == 0 )
// getchar();
tx = calloc(1,sizeof(*tx) + (sizeof(*tx->outpoints) * numvouts));
totalsize += sizeof(*tx) + (sizeof(*tx->outpoints) * numvouts);
char str[65]; printf("%s ht.%d NEW TXID.(%s) vouts.[%d] size.%ld total %ld\n",coin->symbol,height,bits256_str(str,txid),numvouts,sizeof(*tx) + (sizeof(*tx->outpoints) * numvouts),totalsize);
for (i=0; i<numvouts; i++)
tx->outpoints[i].spendvini = -1;
tx->height = height;

Loading…
Cancel
Save