jl777 8 years ago
parent
commit
4ab9ae90a2
  1. 5
      basilisk/basilisk.c
  2. 12
      basilisk/basilisk_ping.c

5
basilisk/basilisk.c

@ -912,12 +912,11 @@ void basilisk_iteration(struct supernet_info *myinfo)
QUEUEITEMS--;
free(msg);
}
if ( myinfo->NOTARY.RELAYID >= 0 )
basilisk_ping_send(myinfo,notary);
}
portable_mutex_unlock(&myinfo->messagemutex);
if ( myinfo->NOTARY.RELAYID >= 0 )
{
basilisk_ping_send(myinfo,notary);
if ( notary != 0 )
{
maxmillis = (1000 / (myinfo->allcoins_numvirts + 1)) + 1;
@ -946,7 +945,7 @@ void basilisks_loop(void *arg)
basilisk_issued_purge(myinfo,600000);
fprintf(stderr,"I");
basilisk_iteration(myinfo);
fprintf(stderr,"2");
fprintf(stderr," backI\n");
basilisk_p2pQ_process(myinfo,777);
fprintf(stderr,"\n");
if ( myinfo->NOTARY.RELAYID >= 0 )

12
basilisk/basilisk_ping.c

@ -247,9 +247,9 @@ void basilisk_ping_process(struct supernet_info *myinfo,struct iguana_peer *addr
}
//printf("PING got %d, processed.%d from (%s)\n",datalen,len,ipbuf);
//else printf("\n");
for (i=0; i<datalen; i++)
printf("%02x",data[i]);
printf("<<<<<<<<<<< input ping from.(%s) rel.%d numrelays.%d datalen.%d relay.%d Q.%d\n",ipbuf,basilisk_relayid(myinfo,(uint32_t)calc_ipbits(ipbuf)),numrelays,datalen,myinfo->NOTARY.RELAYID,QUEUEITEMS);
//for (i=0; i<datalen; i++)
// printf("%02x",data[i]);
//printf("<<<<<<<<<<< input ping from.(%s) rel.%d numrelays.%d datalen.%d relay.%d Q.%d\n",ipbuf,basilisk_relayid(myinfo,(uint32_t)calc_ipbits(ipbuf)),numrelays,datalen,myinfo->NOTARY.RELAYID,QUEUEITEMS);
}
int32_t basilisk_ping_gen(struct supernet_info *myinfo,uint8_t *data,int32_t maxlen)
@ -261,9 +261,9 @@ int32_t basilisk_ping_gen(struct supernet_info *myinfo,uint8_t *data,int32_t max
datalen += basilisk_ping_genrelay(myinfo,&data[datalen],maxlen - datalen,&myinfo->NOTARY.RELAYS[i]);
//datalen += basilisk_ping_genDEX(myinfo,&data[datalen],maxlen - datalen);
datalen += basilisk_ping_genMSG(myinfo,&data[datalen],maxlen - datalen);
for (i=0; i<datalen; i++)
printf("%02x",data[i]);
printf("output ping datalen.%d relay.%d >>>>>>>>>> Q.%d\n",datalen,myinfo->NOTARY.RELAYID,QUEUEITEMS);
//for (i=0; i<datalen; i++)
// printf("%02x",data[i]);
//printf("output ping datalen.%d relay.%d >>>>>>>>>> Q.%d\n",datalen,myinfo->NOTARY.RELAYID,QUEUEITEMS);
return(datalen);
}

Loading…
Cancel
Save