diff --git a/basilisk/basilisk_DEX.c b/basilisk/basilisk_DEX.c index efc5d1c13..1b8cf6d54 100755 --- a/basilisk/basilisk_DEX.c +++ b/basilisk/basilisk_DEX.c @@ -178,7 +178,7 @@ cJSON *basilisk_requestjson(struct basilisk_request *rp) { for (i=0; imyaddr.persistent,issueR.srchash) == 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); + 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 ) diff --git a/basilisk/basilisk_MSG.c b/basilisk/basilisk_MSG.c index 19fc1bd24..d4a2c0c54 100755 --- a/basilisk/basilisk_MSG.c +++ b/basilisk/basilisk_MSG.c @@ -216,17 +216,6 @@ char *basilisk_respond_addmessage(struct supernet_info *myinfo,uint8_t *key,int3 msg->expiration = (uint32_t)time(NULL) + duration; HASH_ADD_KEYPTR(hh,myinfo->messagetable,msg->key,msg->keylen,msg); QUEUEITEMS++; - { - struct basilisk_request R; - /*int32_t i; for (i=0; iexpiration,msg,msg->hh.next,msg->hh.prev); - } - portable_mutex_unlock(&myinfo->messagemutex); //if ( myinfo->NOTARY.RELAYID >= 0 ) // dpow_handler(myinfo,msg); @@ -315,12 +304,10 @@ HASH_ARRAY_STRING(basilisk,sendmessage,hash,vals,hexstr) } //else printf("not notary.%d relayid.%d\n",myinfo->IAMNOTARY,myinfo->NOTARY.RELAYID); if ( vals != 0 && juint(vals,"fanout") == 0 ) jaddnum(vals,"fanout",MAX(8,(int32_t)sqrt(myinfo->NOTARY.NUMRELAYS)+2)); + memcpy(space2,key,BASILISK_KEYSIZE); if ( data != 0 && datalen != 0 ) - { - memcpy(space2,key,BASILISK_KEYSIZE); memcpy(&space2[BASILISK_KEYSIZE],data,datalen); - dex_reqsend(myinfo,"DEX",space2,datalen+BASILISK_KEYSIZE); - } + dex_reqsend(myinfo,"DEX",space2,datalen+BASILISK_KEYSIZE); return(basilisk_standardservice("OUT",myinfo,0,jbits256(vals,"desthash"),vals,hexstr,0)); } #include "../includes/iguana_apiundefs.h" diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index c0c690099..2856ad98e 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -125,14 +125,14 @@ int32_t dex_reqsend(struct supernet_info *myinfo,char *handler,uint8_t *data,int memcpy(dexp->packet,data,datalen); dexp->crc32 = calc_crc32(0,data,datalen); sentbytes = nn_send(myinfo->reqsock,dexp,size,0); - //for (i=0; ireqsock,&retptr,NN_MSG,0)) >= 0 ) { ipbits = *retptr; expand_ipbits(ipaddr,ipbits); - printf("req returned.[%d] %08x %s\n",recvbytes,*retptr,ipaddr); + //printf("req returned.[%d] %08x %s\n",recvbytes,*retptr,ipaddr); portable_mutex_lock(&myinfo->dexmutex); n = myinfo->numdexipbits; for (i=0; isubsock >= 0 && (size= nn_recv(myinfo->subsock,&dexp,NN_MSG,0)) >= 0 ) { + printf("SUBSOCK.%08x recv.%d datalen.%d\n",dexp->crc32,size,dexp->datalen); if ( dex_packetcheck(myinfo,dexp,size) == 0 ) { printf("SUBSOCK.%08x ",dexp->crc32);