Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
205d8f94a7
  1. 3
      basilisk/basilisk.c
  2. 2
      basilisk/basilisk_DEX.c

3
basilisk/basilisk.c

@ -853,9 +853,9 @@ void basilisk_requests_poll(struct supernet_info *myinfo)
}
if ( hwm > 0. )
{
printf("hwm %f\n",hwm);
if ( bits256_cmp(myinfo->myaddr.persistent,issueR.hash) == 0 ) // my request
{
printf("my req hwm %f\n",hwm);
if ( (retstr= InstantDEX_accept(myinfo,0,0,0,issueR.requestid,issueR.quoteid)) != 0 )
free(retstr);
if ( (retstr= basilisk_start(myinfo,&issueR,1)) != 0 )
@ -863,6 +863,7 @@ void basilisk_requests_poll(struct supernet_info *myinfo)
}
else //if ( issueR.quoteid == 0 )
{
printf("other req hwm %f\n",hwm);
issueR.quoteid = basilisk_quoteid(&issueR);
issueR.desthash = myinfo->myaddr.persistent;
if ( (retstr= basilisk_start(myinfo,&issueR,0)) != 0 )

2
basilisk/basilisk_DEX.c

@ -228,7 +228,7 @@ char *basilisk_start(struct supernet_info *myinfo,struct basilisk_request *rp,ui
{
cJSON *retjson; //char msgjsonstr[64];
//sprintf(rp->message,"{\"state\":%u\"}",statebits);
if ( myinfo->RELAYID < 0 && (bits256_cmp(rp->hash,myinfo->myaddr.persistent) == 0 || bits256_cmp(rp->desthash,myinfo->myaddr.persistent) == 0) )
if ( (bits256_cmp(rp->hash,myinfo->myaddr.persistent) == 0 || bits256_cmp(rp->desthash,myinfo->myaddr.persistent) == 0) )
{
printf("START thread to complete %u/%u for (%s %.8f) <-> (%s %.8f) q.%u\n",rp->requestid,rp->quoteid,rp->src,dstr(rp->srcamount),rp->dest,dstr(rp->destamount),rp->quoteid);
if ( basilisk_thread_start(myinfo,rp,statebits) != 0 )

Loading…
Cancel
Save