Browse Source

test

etomic
jl777 8 years ago
parent
commit
f1d09f2891
  1. 2
      basilisk/basilisk_DEX.c
  2. 2
      basilisk/basilisk_MSG.c
  3. 1
      basilisk/basilisk_tradebot.c

2
basilisk/basilisk_DEX.c

@ -264,7 +264,7 @@ void basilisk_requests_poll(struct supernet_info *myinfo)
//printf("Call incoming\n");
if ( (retstr= InstantDEX_incoming(myinfo,0,0,0,0)) != 0 )
{
printf("poll.(%s)\n",retstr);
//printf("poll.(%s)\n",retstr);
if ( (retjson= cJSON_Parse(retstr)) != 0 )
{
if ( (outerarray= jarray(&n,retjson,"responses")) != 0 )

2
basilisk/basilisk_MSG.c

@ -217,7 +217,7 @@ char *basilisk_respond_addmessage(struct supernet_info *myinfo,uint8_t *key,int3
HASH_ADD_KEYPTR(hh,myinfo->messagetable,msg->key,msg->keylen,msg);
QUEUEITEMS++;
portable_mutex_unlock(&myinfo->messagemutex);
printf("add message keylen.%d [%d]\n",msg->keylen,datalen);
//printf("add message keylen.%d [%d]\n",msg->keylen,datalen);
//if ( myinfo->NOTARY.RELAYID >= 0 )
// dpow_handler(myinfo,msg);
if ( sendping != 0 )

1
basilisk/basilisk_tradebot.c

@ -316,6 +316,7 @@ double basilisk_request_listprocess(struct supernet_info *myinfo,struct basilisk
double retvals[4],refprice,profitmargin,aveprice; cJSON *retjson; char *retstr;
if ( maxi >= 0 && myinfo->IAMLP != 0 && myrequest == 0 && pendingid == 0 && noquoteflag != 0 && (profitmargin= tradebot_liquidity_active(myinfo,&refprice,"DEX",list[maxi].src,list[maxi].dest,(double)maxamount/SATOSHIDEN)) > 0. )
{
printf("maxi.%d profitmargin %f\n",maxi,profitmargin);
if ( (aveprice= instantdex_avehbla(myinfo,retvals,list[0].src,list[0].dest,1.3 * dstr(list[0].srcamount))) == 0. || refprice > aveprice )
aveprice = refprice;
if ( fabs(aveprice) < SMALLVAL )

Loading…
Cancel
Save