Browse Source

test

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

19
basilisk/basilisk.c

@ -741,14 +741,17 @@ 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) )
char src[16],dest[16],message[128]; bits256 hash; uint64_t amount; uint32_t timestamp; {
for (i=0; i<n; i++) len += iguana_rwnum(0,&data[len],sizeof(sn),&sn);
{ char src[16],dest[16],message[128]; bits256 hash; uint64_t amount; uint32_t timestamp;
clen = data[len++]; for (i=0; i<n; i++)
memcpy(serialized,&data[len],clen), len += clen; {
len += basilisk_rwDEXquote(0,serialized,&hash,src,&amount,dest,&timestamp,message); clen = data[len++];
printf("(%s (%s %.8f) -> %s) ",message,src,dstr(amount),dest); memcpy(serialized,&data[len],clen), len += clen;
len += basilisk_rwDEXquote(0,serialized,&hash,src,&amount,dest,&timestamp,message);
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);

Loading…
Cancel
Save