Browse Source

Test

etomic
jl777 7 years ago
parent
commit
9c49451d87
  1. 2
      iguana/exchanges/LP_commands.c
  2. 9
      iguana/exchanges/LP_nativeDEX.c

2
iguana/exchanges/LP_commands.c

@ -484,7 +484,7 @@ dividends(coin, height, <args>)\n\
{ {
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("%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);
ptr->addr_listunspent_requested = (uint32_t)time(NULL); ptr->addr_listunspent_requested = (uint32_t)time(NULL);
} }
} }

9
iguana/exchanges/LP_nativeDEX.c

@ -349,7 +349,7 @@ void LP_smartutxos_push(struct iguana_info *coin)
vout = jint(item,"tx_pos"); vout = jint(item,"tx_pos");
value = j64bits(item,"value"); value = j64bits(item,"value");
height = jint(item,"height"); height = jint(item,"height");
if ( 0 ) if ( IAMLP == 0 )
{ {
HASH_ITER(hh,LP_peerinfos,peer,tmp) HASH_ITER(hh,LP_peerinfos,peer,tmp)
{ {
@ -357,8 +357,6 @@ void LP_smartutxos_push(struct iguana_info *coin)
free(retstr); free(retstr);
} }
} }
else
{
req = cJSON_CreateObject(); req = cJSON_CreateObject();
jaddstr(req,"method","uitem"); jaddstr(req,"method","uitem");
jaddstr(req,"coin",coin->symbol); jaddstr(req,"coin",coin->symbol);
@ -367,11 +365,10 @@ void LP_smartutxos_push(struct iguana_info *coin)
jaddnum(req,"vout",vout); jaddnum(req,"vout",vout);
jaddnum(req,"ht",height); jaddnum(req,"ht",height);
jadd64bits(req,"value",value); jadd64bits(req,"value",value);
//printf("ADDR_UNSPENTS[] <- %s\n",jprint(req,0)); printf("ADDR_UNSPENTS[] <- %s\n",jprint(req,0));
LP_reserved_msg("","",zero,jprint(req,1)); LP_reserved_msg("","",zero,jprint(req,1));
} }
} }
}
free_json(array); free_json(array);
} }
} }
@ -564,7 +561,7 @@ int32_t LP_mainloop_iter(void *ctx,char *myipaddr,struct LP_peerinfo *mypeer,int
memset(&zero,0,sizeof(zero)); memset(&zero,0,sizeof(zero));
if ( coin->addr_listunspent_requested != 0 ) if ( coin->addr_listunspent_requested != 0 )
{ {
//printf("addr_listunspent_requested %u\n",coin->addr_listunspent_requested); printf("PUSH addr_listunspent_requested %u\n",coin->addr_listunspent_requested);
LP_smartutxos_push(coin); LP_smartutxos_push(coin);
coin->addr_listunspent_requested = 0; coin->addr_listunspent_requested = 0;
} }

Loading…
Cancel
Save