|
|
@ -25,6 +25,7 @@ uint32_t basilisk_requestid(struct basilisk_request *rp) |
|
|
|
memset(R.desthash.bytes,0,sizeof(R.desthash)); |
|
|
|
memset(R.message,0,sizeof(R.message)); |
|
|
|
memset(&R,0,(long)&R.volatile_start - (long)&R); |
|
|
|
char str[65],str2[65]; printf("REQUESTID: t.%u r.%u q.%u %s %.8f %s -> %s %.8f %s (%s) crc.%u\n",R.timestamp,R.requestid,R.quoteid,R.src,dstr(R.srcamount),bits256_str(str,R.hash),R.dest,dstr(R.destamount),bits256_str(str2,R.desthash),R.message,calc_crc32(0,(void *)&R,sizeof(R))); |
|
|
|
return(calc_crc32(0,(void *)&R,sizeof(R))); |
|
|
|
} |
|
|
|
|
|
|
@ -34,6 +35,7 @@ uint32_t basilisk_quoteid(struct basilisk_request *rp) |
|
|
|
R = *rp; |
|
|
|
R.relaybits = 0; |
|
|
|
memset(R.message,0,sizeof(R.message)); |
|
|
|
char str[65],str2[65]; printf("QUOTEID: t.%u r.%u q.%u %s %.8f %s -> %s %.8f %s (%s) crc.%u\n",R.timestamp,R.requestid,R.quoteid,R.src,dstr(R.srcamount),bits256_str(str,R.hash),R.dest,dstr(R.destamount),bits256_str(str2,R.desthash),R.message,calc_crc32(0,(void *)&R,sizeof(R))); |
|
|
|
return(calc_crc32(0,(void *)&R,sizeof(R))); |
|
|
|
} |
|
|
|
|
|
|
@ -50,7 +52,6 @@ int32_t basilisk_rwDEXquote(int32_t rwflag,uint8_t *serialized,struct basilisk_r |
|
|
|
len += iguana_rwbignum(rwflag,&serialized[len],sizeof(rp->desthash),rp->desthash.bytes); |
|
|
|
len += iguana_rwnum(rwflag,&serialized[len],sizeof(rp->destamount),&rp->destamount); |
|
|
|
len += iguana_rwvarstr(rwflag,&serialized[len],sizeof(rp->message)-1,rp->message); |
|
|
|
char str[65],str2[65]; printf("t.%u r.%u q.%u %s %.8f %s -> %s %.8f %s (%s)\n",rp->timestamp,rp->requestid,rp->quoteid,rp->src,dstr(rp->srcamount),bits256_str(str,rp->hash),rp->dest,dstr(rp->destamount),bits256_str(str2,rp->desthash),rp->message); |
|
|
|
if ( rp->quoteid != 0 && basilisk_quoteid(rp) != rp->quoteid ) |
|
|
|
printf("basilisk_rwDEXquote: quoteid.%u mismatch %u\n",basilisk_quoteid(rp),rp->quoteid); |
|
|
|
if ( basilisk_requestid(rp) != rp->requestid ) |
|
|
|