Browse Source

Prevent auto split for etomics

jl777
jl777 7 years ago
parent
commit
91b84b468f
  1. 5
      iguana/exchanges/LP_ordermatch.c
  2. 4
      iguana/exchanges/LP_utxo.c
  3. 2
      iguana/exchanges/coins

5
iguana/exchanges/LP_ordermatch.c

@ -1483,6 +1483,10 @@ char *LP_autobuy(void *ctx,int32_t fomoflag,char *myipaddr,int32_t mypubsock,cha
jaddnum(retjson,"wait",Alice_expiration-time(NULL)); jaddnum(retjson,"wait",Alice_expiration-time(NULL));
return(jprint(retjson,1)); return(jprint(retjson,1));
} else LP_alicequery_clear(); } else LP_alicequery_clear();
if ( relcoin->etomic[0] != 0 )
LP_address_utxo_reset(&num,LP_coinfind("ETOMIC"));
else
{
LP_address_utxo_reset(&num,relcoin); LP_address_utxo_reset(&num,relcoin);
if ( num <= 1 ) if ( num <= 1 )
{ {
@ -1493,6 +1497,7 @@ char *LP_autobuy(void *ctx,int32_t fomoflag,char *myipaddr,int32_t mypubsock,cha
} }
return(clonestr("{\"error\":\"not enough utxo, please make more deposits\"}")); return(clonestr("{\"error\":\"not enough utxo, please make more deposits\"}"));
} }
}
LP_txfees(&txfee,&desttxfee,base,rel); LP_txfees(&txfee,&desttxfee,base,rel);
if ( txfee != 0 && txfee < 10000 ) if ( txfee != 0 && txfee < 10000 )
txfee = 10000; txfee = 10000;

4
iguana/exchanges/LP_utxo.c

@ -519,9 +519,11 @@ int32_t LP_address_utxoadd(int32_t skipsearch,uint32_t timestamp,char *debug,str
struct LP_address *LP_address_utxo_reset(int32_t *nump,struct iguana_info *coin) struct LP_address *LP_address_utxo_reset(int32_t *nump,struct iguana_info *coin)
{ {
struct LP_address *ap; struct LP_address_utxo *up,*tmp; int32_t i,n,numconfs,m,vout,height; cJSON *array,*item,*txobj; bits256 zero; int64_t value; bits256 txid; uint32_t now; struct LP_address *ap; struct LP_address_utxo *up,*tmp; int32_t i,n,numconfs,m,vout,height; cJSON *array,*item,*txobj; bits256 zero; int64_t value; bits256 txid; uint32_t now;
*nump = 0;
if ( coin == 0 )
return(0);
LP_address(coin,coin->smartaddr); LP_address(coin,coin->smartaddr);
memset(zero.bytes,0,sizeof(zero)); memset(zero.bytes,0,sizeof(zero));
*nump = 0;
LP_listunspent_issue(coin->symbol,coin->smartaddr,2,zero,zero); LP_listunspent_issue(coin->symbol,coin->smartaddr,2,zero,zero);
if ( (ap= LP_addressfind(coin,coin->smartaddr)) == 0 ) if ( (ap= LP_addressfind(coin,coin->smartaddr)) == 0 )
{ {

2
iguana/exchanges/coins

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save