Browse Source

Merge pull request #540 from jl777/spvdex

Spvdex
etomic
jl777 7 years ago
committed by GitHub
parent
commit
fb172b5730
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      iguana/exchanges/LP_NXT.c
  2. 4
      iguana/exchanges/LP_ordermatch.c
  3. 2
      iguana/exchanges/LP_portfolio.c
  4. 2
      iguana/exchanges/LP_privkey.c
  5. 4
      iguana/exchanges/LP_stats.c
  6. 3
      iguana/exchanges/coins
  7. 2
      iguana/exchanges/coins.json

3
iguana/exchanges/LP_NXT.c

@ -202,8 +202,9 @@ void NXTventure_liquidation()
cJSON *LP_NXT_redeems()
{
char url[1024],*retstr,*recv,*method,*msgstr,assetname[128]; uint64_t totals[2][sizeof(assetids)/sizeof(*assetids)],mult,txnum,assetid,qty; int32_t i,ind,numtx=0,past_marker=0; cJSON *item,*attach,*decjson,*array,*msgjson,*encjson,*retjson=0;
//sleep 1; fiat/supernet sendtoaddress RNZZuQYu8xJLZHuekhd96hYfoQuiCMz99T 1001.44150000 # txnum.8537615468620726612
//sleep 1; fiat/pangea sendtoaddress RWMdRaUmMZqKkEibwEhY6XS3RLCXJDWHTi 22.10910000 # txnum.2649622877615958504
uint64_t txnum_marker = calc_nxt64bits("2649622877615958504"); // set to most recent processed
uint64_t txnum_marker = calc_nxt64bits("8537615468620726612"); // 2649622877615958504"); // set to most recent processed
uint64_t txnum_marker2 = calc_nxt64bits("7256847492742571143"); // dont change, end marker
char *passphrase = "";
char *account = "NXT-MRBN-8DFH-PFMK-A4DBM";

4
iguana/exchanges/LP_ordermatch.c

@ -596,7 +596,7 @@ char *LP_connectedalice(struct LP_quoteinfo *qp,char *pairstr) // alice
LP_availableset(qp->desttxid,qp->vout);
LP_availableset(qp->feetxid,qp->feevout);
LP_aliceid(qp->tradeid,qp->aliceid,"error4",0,0);
printf("quote validate error %.0f\n",qprice);
printf("quote %s/%s validate error %.0f\n",qp->srccoin,qp->destcoin,qprice);
return(clonestr("{\"error\":\"quote validation error\"}"));
}
if ( LP_myprice(&bid,&ask,qp->srccoin,qp->destcoin) <= SMALLVAL || bid <= SMALLVAL )
@ -819,7 +819,7 @@ double LP_trades_pricevalidate(struct LP_quoteinfo *qp,struct iguana_info *coin,
}
if ( (qprice= LP_quote_validate(autxo,butxo,qp,1)) <= SMALLVAL )
{
printf("quote validate error %.0f\n",qprice);
printf("quote %s/%s validate error %.0f\n",qp->srccoin,qp->destcoin,qprice);
return(-3);
}
if ( qprice < (price - 0.00000001) * 0.998 )

2
iguana/exchanges/LP_portfolio.c

@ -26,7 +26,7 @@ struct LP_autoprice_ref
double margin,factor,offset,lastbid,lastask;
cJSON *fundvalue;
uint32_t count;
} LP_autorefs[100];
} LP_autorefs[1024];
int32_t LP_autoprices,num_LP_autorefs;
char LP_portfolio_base[128],LP_portfolio_rel[128];

2
iguana/exchanges/LP_privkey.c

@ -300,7 +300,7 @@ bits256 LP_privkeycalc(void *ctx,uint8_t *pubkey33,bits256 *pubkeyp,struct iguan
{
if ( jobj(retjson,"error") != 0 )
{
printf("cant importprivkey.%s -> (%s), abort session\n",coin->symbol,jprint(retjson,1));
printf("cant importprivkey.%s %s -> (%s), abort session\n",coin->symbol,coin->smartaddr,jprint(retjson,1));
exit(-1);
}
free_json(retjson);

4
iguana/exchanges/LP_stats.c

@ -455,6 +455,7 @@ int32_t LP_statslog_parsequote(char *method,cJSON *lineobj)
{
HASH_ITER(hh,LP_swapstats,sp,tmp)
{
static uint32_t counter;
if ( sp->Q.R.requestid == requestid && sp->Q.R.quoteid == quoteid )
{
sp->methodind = methodind;
@ -463,7 +464,8 @@ int32_t LP_statslog_parsequote(char *method,cJSON *lineobj)
flag = 1;
break;
}
printf("error after delayed match\n");
if ( counter++ < 10 )
printf("error after delayed match\n");
}
}
}

3
iguana/exchanges/coins

File diff suppressed because one or more lines are too long

2
iguana/exchanges/coins.json

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