Browse Source

Test

etomic
jl777 7 years ago
parent
commit
2e6fba307f
  1. 2
      iguana/exchanges/LP_commands.c
  2. 4
      iguana/exchanges/LP_socket.c
  3. 4
      iguana/exchanges/LP_utxo.c
  4. 1
      iguana/exchanges/LP_utxos.c

2
iguana/exchanges/LP_commands.c

@ -451,6 +451,7 @@ dividends(coin, height, <args>)\n\
{ {
if ( coinaddr[0] != 0 ) if ( coinaddr[0] != 0 )
{ {
LP_address(ptr,coinaddr);
LP_listunspent_issue(coin,coinaddr,1); LP_listunspent_issue(coin,coinaddr,1);
if ( strcmp(coinaddr,ptr->smartaddr) == 0 && bits256_nonz(G.LP_mypriv25519) != 0 ) if ( strcmp(coinaddr,ptr->smartaddr) == 0 && bits256_nonz(G.LP_mypriv25519) != 0 )
{ {
@ -484,6 +485,7 @@ dividends(coin, height, <args>)\n\
{ {
if ( coinaddr[0] != 0 ) if ( coinaddr[0] != 0 )
{ {
LP_address(ptr,coinaddr);
if ( strcmp(coinaddr,ptr->smartaddr) == 0 && bits256_nonz(G.LP_mypriv25519) != 0 ) if ( strcmp(coinaddr,ptr->smartaddr) == 0 && bits256_nonz(G.LP_mypriv25519) != 0 )
{ {
//printf("ADDR_UNSPENTS %s %s is my address being asked for!\n",ptr->symbol,coinaddr); //printf("ADDR_UNSPENTS %s %s is my address being asked for!\n",ptr->symbol,coinaddr);

4
iguana/exchanges/LP_socket.c

@ -351,7 +351,7 @@ int32_t electrum_process_array(struct iguana_info *coin,struct electrum_info *ep
} }
if ( value != 0 || tx->height > 0 ) if ( value != 0 || tx->height > 0 )
{ {
printf("from electrum_process_array\n"); //printf("from electrum_process_array\n");
flag += LP_address_utxoadd(coin,coinaddr,txid,v,value,tx->height,-1); flag += LP_address_utxoadd(coin,coinaddr,txid,v,value,tx->height,-1);
} }
//printf("v.%d numvouts.%d %.8f (%s)\n",v,tx->numvouts,dstr(tx->outpoints[jint(item,"tx_pos")].value),jprint(item,0)); //printf("v.%d numvouts.%d %.8f (%s)\n",v,tx->numvouts,dstr(tx->outpoints[jint(item,"tx_pos")].value),jprint(item,0));
@ -484,7 +484,7 @@ cJSON *electrum_address_gethistory(char *symbol,struct electrum_info *ep,cJSON *
if ( tx->height > 0 && tx->height != height ) if ( tx->height > 0 && tx->height != height )
printf("update %s height.%d <- %d\n",bits256_str(str,txid),tx->height,height); printf("update %s height.%d <- %d\n",bits256_str(str,txid),tx->height,height);
tx->height = height; tx->height = height;
printf("from history\n"); //printf("from history\n");
LP_address_utxoadd(coin,addr,txid,0,0,height,-1); LP_address_utxoadd(coin,addr,txid,0,0,height,-1);
} }
} }

4
iguana/exchanges/LP_utxo.c

@ -241,7 +241,7 @@ int32_t LP_address_utxoadd(struct iguana_info *coin,char *coinaddr,bits256 txid,
DL_APPEND(ap->utxos,up); DL_APPEND(ap->utxos,up);
portable_mutex_unlock(&coin->addrmutex); portable_mutex_unlock(&coin->addrmutex);
retval = 1; retval = 1;
if ( 1 && height > 0 && strcmp("REVS",coin->symbol) == 0 ) if ( 0 && height > 0 && strcmp("REVS",coin->symbol) == 0 )
printf("ADD UTXO >> %s %s %s/v%d ht.%d %.8f\n",coin->symbol,coinaddr,bits256_str(str,txid),vout,height,dstr(value)); printf("ADD UTXO >> %s %s %s/v%d ht.%d %.8f\n",coin->symbol,coinaddr,bits256_str(str,txid),vout,height,dstr(value));
} }
} // else printf("cant get ap %s %s\n",coin->symbol,coinaddr); } // else printf("cant get ap %s %s\n",coin->symbol,coinaddr);
@ -484,7 +484,7 @@ int32_t LP_unspents_array(struct iguana_info *coin,char *coinaddr,cJSON *array)
} }
if ( errs == 0 ) if ( errs == 0 )
{ {
printf("from LP_unspents_array\n"); //printf("from LP_unspents_array\n");
LP_address_utxoadd(coin,coinaddr,txid,v,val,height,-1); LP_address_utxoadd(coin,coinaddr,txid,v,val,height,-1);
count++; count++;
} }

1
iguana/exchanges/LP_utxos.c

@ -520,6 +520,7 @@ int32_t LP_privkey_init(int32_t mypubsock,struct iguana_info *coin,bits256 mypri
//printf("privkey init.(%s) %s\n",coin->symbol,coin->smartaddr); //printf("privkey init.(%s) %s\n",coin->symbol,coin->smartaddr);
if ( coin->inactive == 0 ) if ( coin->inactive == 0 )
LP_listunspent_issue(coin->symbol,coin->smartaddr,0); LP_listunspent_issue(coin->symbol,coin->smartaddr,0);
LP_address(coin,coin->smartaddr);
if ( coin->inactive == 0 && (array= LP_listunspent(coin->symbol,coin->smartaddr)) != 0 ) if ( coin->inactive == 0 && (array= LP_listunspent(coin->symbol,coin->smartaddr)) != 0 )
{ {
txfee = LP_txfeecalc(coin,0,0); txfee = LP_txfeecalc(coin,0,0);

Loading…
Cancel
Save