From 7073d7aac1c2ea4cf5b9ba3105f25368ddc2b6b6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 1 Jul 2016 09:28:33 -0300 Subject: [PATCH] test --- basilisk/basilisk_DEX.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/basilisk/basilisk_DEX.c b/basilisk/basilisk_DEX.c index 01a13afe5..0783bf4a4 100755 --- a/basilisk/basilisk_DEX.c +++ b/basilisk/basilisk_DEX.c @@ -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 )