Browse Source

test

etomic
jl777 8 years ago
parent
commit
81e0663951
  1. 2
      basilisk/basilisk.h
  2. 8
      basilisk/basilisk_DEX.c
  3. 6
      iguana/dpow/dpow_network.c

2
basilisk/basilisk.h

@ -25,7 +25,7 @@
#define BASILISK_MINFANOUT 8
#define BASILISK_MAXFANOUT 64
#define BASILISK_DEFAULTDIFF 0x1effffff
#define BASILISK_DEXDURATION 180
#define BASILISK_DEXDURATION 60
#define BASILISK_MSGDURATION 60
#define BASILISK_AUCTION_DURATION 20

8
basilisk/basilisk_DEX.c

@ -297,19 +297,19 @@ void basilisk_requests_poll(struct supernet_info *myinfo)
printf("my req hwm %f -> %u\n",hwm,issueR.requestid);
basilisk_channelsend(myinfo,issueR.srchash,issueR.desthash,channel,0x4000000,(void *)&issueR.requestid,sizeof(issueR.requestid),60);
numiters = 0;
while ( numiters < 10 && (crc= basilisk_crcsend(myinfo,0,buf,sizeof(buf),issueR.srchash,issueR.desthash,channel,0x4000000,(void *)&issueR.requestid,sizeof(issueR.requestid),crcs)) == 0 )
/*while ( numiters < 10 && (crc= basilisk_crcsend(myinfo,0,buf,sizeof(buf),issueR.srchash,issueR.desthash,channel,0x4000000,(void *)&issueR.requestid,sizeof(issueR.requestid),crcs)) == 0 )
{
printf("didnt get back what was sent\n");
sleep(3);
basilisk_channelsend(myinfo,issueR.srchash,issueR.desthash,channel,0x4000000,(void *)&issueR.requestid,sizeof(issueR.requestid),60);
numiters++;
}
if ( crc != 0 )
if ( crc != 0 )*/
{
printf("crc.%08x -> basilisk_starta\n",crc);
//printf("crc.%08x -> basilisk_starta\n",crc);
if ( (retstr= basilisk_start(myinfo,&issueR,1,issueR.optionhours * 3600)) != 0 )
free(retstr);
} else printf("couldnt accept offer\n");
} // else printf("couldnt accept offer\n");
}
else //if ( issueR.quoteid == 0 )
{

6
iguana/dpow/dpow_network.c

@ -394,10 +394,12 @@ char *_dex_reqsend(struct supernet_info *myinfo,char *handler,uint8_t *data,int3
printf("%d: subscribe connect (%s)\n",myinfo->numdexipbits,str);
}
}
nanomsg_tcpname(0,str,ipaddr,REP_SOCK);
if ( (rand() % 100) < 4 )
{
nanomsg_tcpname(0,str,ipaddr,REP_SOCK);
nn_connect(myinfo->reqsock,str);
printf("%d: req connect (%s)\n",myinfo->numdexipbits,str);
printf("%d: req connect (%s)\n",myinfo->numdexipbits,str);
}
}
}
if ( freeptr != 0 )

Loading…
Cancel
Save