Browse Source

Test

etomic
jl777 7 years ago
parent
commit
d9b40f78a9
  1. 2
      iguana/exchanges/LP_tradebots.c
  2. 3
      iguana/exchanges/LP_utxos.c

2
iguana/exchanges/LP_tradebots.c

@ -278,7 +278,7 @@ void LP_tradebot_timeslice(void *ctx,struct LP_tradebot *bot)
else if ( (bot->pendrelsum+bot->relsum) >= bot->totalrelvolume-SMALLVAL || (bot->basesum+bot->pendbasesum) >= bot->totalbasevolume-SMALLVAL ) else if ( (bot->pendrelsum+bot->relsum) >= bot->totalrelvolume-SMALLVAL || (bot->basesum+bot->pendbasesum) >= bot->totalbasevolume-SMALLVAL )
bot->pause = (uint32_t)time(NULL); bot->pause = (uint32_t)time(NULL);
printf("%s\n",jprint(LP_tradebot_json(bot),1)); printf("%s\n",jprint(LP_tradebot_json(bot),1));
} else printf("didnt get any trade pending %s\n\n",bot->name); } else printf("didnt get any trade pending %s %s\n\n",bot->name,retstr);
free_json(pending); free_json(pending);
} else printf("%s\n",retstr); } else printf("%s\n",retstr);
free(retstr); free(retstr);

3
iguana/exchanges/LP_utxos.c

@ -247,12 +247,13 @@ struct LP_utxoinfo *LP_utxo_bestfit(char *symbol,uint64_t destsatoshis)
{ {
if ( LP_iseligible(&srcvalue,&srcvalue2,utxo->iambob,symbol,utxo->payment.txid,utxo->payment.vout,utxo->S.satoshis,utxo->fee.txid,utxo->fee.vout) == 0 ) if ( LP_iseligible(&srcvalue,&srcvalue2,utxo->iambob,symbol,utxo->payment.txid,utxo->payment.vout,utxo->S.satoshis,utxo->fee.txid,utxo->fee.vout) == 0 )
{ {
printf("not elibible\n");
//if ( utxo->T.spentflag == 0 ) //if ( utxo->T.spentflag == 0 )
// utxo->T.spentflag = (uint32_t)time(NULL); // utxo->T.spentflag = (uint32_t)time(NULL);
continue; continue;
} }
bestutxo = utxo; bestutxo = utxo;
} //else printf("skip alice utxo %.8f vs dest %.8f\n",dstr(utxo->S.satoshis),dstr(destsatoshis)); } else printf("skip alice utxo %.8f vs dest %.8f\n",dstr(utxo->S.satoshis),dstr(destsatoshis));
} }
} }
return(bestutxo); return(bestutxo);

Loading…
Cancel
Save