Browse Source

Prevent dust level change

pass-iguana-arg
jl777 7 years ago
parent
commit
dcb9bd1525
  1. 6
      iguana/exchanges/LP_transaction.c
  2. 2
      iguana/exchanges/coins
  3. 1
      iguana/m_notary_run

6
iguana/exchanges/LP_transaction.c

@ -1627,7 +1627,7 @@ char *LP_createblasttransaction(uint64_t *changep,int32_t *changeoutp,cJSON **tx
return(0);
}
}
if ( change < 6000 )
if ( change < 6000 || change < txfee )
change = 0;
*changep = change;
if ( change != 0 )
@ -1921,7 +1921,7 @@ char *LP_autosplit(struct iguana_info *coin)
else balance = LP_RTsmartbalance(coin);
//printf("%s balance %.8f\n",coin->symbol,dstr(balance));
balance -= coin->txfee - 0.001;
if ( balance > coin->txfee )
if ( balance > coin->txfee && balance > 1000000 )
{
halfval = (balance / 100) * 45;
argjson = cJSON_CreateObject();
@ -1942,7 +1942,7 @@ char *LP_autosplit(struct iguana_info *coin)
retstr = LP_withdraw(coin,argjson);
free_json(argjson);
return(retstr);
} else return(clonestr("{\"error\":\"less than 0.0011 in balance\"}"));
} else return(clonestr("{\"error\":\"balance too small to autosplit, please make more deposits\"}"));
}
return(clonestr("{\"error\":\"couldnt autosplit\"}"));
}

2
iguana/exchanges/coins

File diff suppressed because one or more lines are too long

1
iguana/m_notary_run

@ -22,6 +22,7 @@ curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"ad
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"addnotary\",\"ipaddr\":\"142.54.164.114\"}"
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"addnotary\",\"ipaddr\":\"45.7.229.33\"}"
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"addnotary\",\"ipaddr\":\"103.6.12.111\"}"
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"addnotary\",\"ipaddr\":\"155.254.17.21\"}"
#tests/addnotarys_7776
coins/btc_7776

Loading…
Cancel
Save