Browse Source

Test

etomic
jl777 7 years ago
parent
commit
be98b5d3f3
  1. 1
      iguana/exchanges/LP_nativeDEX.c
  2. 2
      iguana/exchanges/LP_ordermatch.c
  3. 6
      iguana/exchanges/LP_socket.c

1
iguana/exchanges/LP_nativeDEX.c

@ -18,6 +18,7 @@
// LP_nativeDEX.c // LP_nativeDEX.c
// marketmaker // marketmaker
// //
// version info
// previously, it used to show amount, kmd equiv, perc // previously, it used to show amount, kmd equiv, perc
// swap started, pending, locked, finished, ... // swap started, pending, locked, finished, ...
// aliceid // aliceid

2
iguana/exchanges/LP_ordermatch.c

@ -885,7 +885,7 @@ struct LP_utxoinfo *LP_buyutxo(double *ordermatchpricep,int64_t *bestsatoshisp,i
return(0); return(0);
if ( basecoin->electrum == 0 ) if ( basecoin->electrum == 0 )
max = 1000; max = 1000;
else max = 40; else max = LP_MAXDESIRED_UTXOS;
utxos = calloc(max,sizeof(*utxos)); utxos = calloc(max,sizeof(*utxos));
LP_txfees(&txfee,&desttxfee,base,autxo->coin); LP_txfees(&txfee,&desttxfee,base,autxo->coin);
//printf("LP_buyutxo maxprice %.8f relvol %.8f %s/%s %.8f %.8f\n",maxprice,dstr(autxo->S.satoshis),base,autxo->coin,dstr(txfee),dstr(desttxfee)); //printf("LP_buyutxo maxprice %.8f relvol %.8f %s/%s %.8f %.8f\n",maxprice,dstr(autxo->S.satoshis),base,autxo->coin,dstr(txfee),dstr(desttxfee));

6
iguana/exchanges/LP_socket.c

@ -1027,6 +1027,7 @@ cJSON *LP_electrumserver(struct iguana_info *coin,char *ipaddr,uint16_t port)
if ( ipaddr == 0 || ipaddr[0] == 0 || port == 0 ) if ( ipaddr == 0 || ipaddr[0] == 0 || port == 0 )
{ {
coin->electrum = 0; coin->electrum = 0;
coin->inactive = (uint32_t)time(NULL);
//printf("would have disabled %s electrum here\n",coin->symbol); //printf("would have disabled %s electrum here\n",coin->symbol);
return(cJSON_Parse("{\"result\":\"success\",\"status\":\"electrum mode disabled, now in native coin mode\"}")); return(cJSON_Parse("{\"result\":\"success\",\"status\":\"electrum mode disabled, now in native coin mode\"}"));
} }
@ -1060,6 +1061,11 @@ cJSON *LP_electrumserver(struct iguana_info *coin,char *ipaddr,uint16_t port)
} }
else else
{ {
if ( coin->electrum == 0 )
{
coin->electrum = ep;
ep->prev = 0;
}
jaddstr(retjson,"result","success"); jaddstr(retjson,"result","success");
jaddstr(retjson,"status","already there"); jaddstr(retjson,"status","already there");
if ( ep->numerrors > 0 ) if ( ep->numerrors > 0 )

Loading…
Cancel
Save