Browse Source

Test

etomic
jl777 7 years ago
parent
commit
4e04b93f11
  1. 7
      iguana/exchanges/LP_nativeDEX.c
  2. 5
      iguana/exchanges/LP_ordermatch.c

7
iguana/exchanges/LP_nativeDEX.c

@ -21,13 +21,6 @@
// ZEC LP_transaction_fromdata mismatched txid e2a3eebcf5bef6fe63296f53ce35d2f2c6e3b29c7c907da4171a580f50c93c74 vs 1ed5c15bbf991ff42c73b1492d1bb50e91d1d731c86cb3058405cff95cd9bd70
//0200000000018c343500000000001976a9141462c3dd3f936d595c9af55978003b27c250441f88ac000000000100000000000000009c5b3500000000005a6c707fc604699d0166b2a750c8a2ff21c8aed0b6e6fe160f651da8cf865c2aa079a7f71f7782604785e1f9a7300cd6c89ca50b5d91f6c0ae5f293ea5a72e62bb0f05da84510e6431c5d4be7a372221265fd98dbccee11f5ed064c5afaa19eff27fd12c30a7a5205f70c99f22b7090c00048c1c9767eea1c79e54ed60c08c138758ad73d43f2692fcb05f data2json n.44 vs len.
//.53/100 ordermatch 0.16600749 best satoshis 0.52354320 destsatoshis 0.08687889 txfees (0.00010000 0.00010000)
//LP_txfees(0.00010000 0.00010000)
//>>>>>>> quote satoshis.(0.52354320 0.08687889) MNZ 0.52354320 -> KMD 0.08687889
//LP_txfees(0.00010000 0.00010000)
//qprice 0.16597577 <- 0.08687889/0.52354320 txfees.(0.00010000 0.00010000) vs (0.00010000 0.00010000)
//destsatoshis 0.08687889 is -> why quote validate error -13 for alice
// select oldest utxo first
// handles <-> pubkeys, deal with offline pubkeys, reputations, bonds etc.
// depth and trade to pubkey

5
iguana/exchanges/LP_ordermatch.c

@ -897,6 +897,11 @@ char *LP_autobuy(void *ctx,char *myipaddr,int32_t mypubsock,char *base,char *rel
return(clonestr("{\"error\":\"cant find alice utxo that is big enough\"}"));
if ( destsatoshis < autxo->S.satoshis )
autxo->S.satoshis = destsatoshis;
if ( destsatoshis < (autxo->payment.value / LP_MINCLIENTVOL) || autxo->payment.value < desttxfee*LP_MINSIZE_TXFEEMULT )
{
printf("destsatoshis %.8f vs utxo %.8f this would have triggered an quote error -13\n",dstr(destsatoshis),dstr(autxo->payment.value));
return(clonestr("{\"error\":\"cant find alice utxo that is small enough\"}"));
}
while ( 1 )
{
if ( (bestutxo= LP_buyutxo(&ordermatchprice,&bestsatoshis,&bestdestsatoshis,autxo,base,maxprice,duration,txfee,desttxfee,gui,pubkeys,numpubs)) == 0 || ordermatchprice == 0. || bestdestsatoshis == 0 )

Loading…
Cancel
Save