Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
abc14de1ab
  1. 5
      basilisk/basilisk.c

5
basilisk/basilisk.c

@ -741,7 +741,9 @@ void basilisk_respond_ping(struct supernet_info *myinfo,struct iguana_peer *addr
break; break;
len += n; len += n;
} }
len += iguana_rwnum(1,&data[len],sizeof(sn),&sn); if ( len < datalen-sizeof(sn) )
{
len += iguana_rwnum(0,&data[len],sizeof(sn),&sn);
char src[16],dest[16],message[128]; bits256 hash; uint64_t amount; uint32_t timestamp; char src[16],dest[16],message[128]; bits256 hash; uint64_t amount; uint32_t timestamp;
for (i=0; i<n; i++) for (i=0; i<n; i++)
{ {
@ -750,6 +752,7 @@ void basilisk_respond_ping(struct supernet_info *myinfo,struct iguana_peer *addr
len += basilisk_rwDEXquote(0,serialized,&hash,src,&amount,dest,&timestamp,message); len += basilisk_rwDEXquote(0,serialized,&hash,src,&amount,dest,&timestamp,message);
printf("(%s (%s %.8f) -> %s) ",message,src,dstr(amount),dest); printf("(%s (%s %.8f) -> %s) ",message,src,dstr(amount),dest);
} }
}
if ( len != datalen ) if ( len != datalen )
printf("PING got %d, processed.%d from (%s)\n",datalen,len,ipbuf); printf("PING got %d, processed.%d from (%s)\n",datalen,len,ipbuf);
else printf("\n"); else printf("\n");

Loading…
Cancel
Save