From bd722ea458edd4cdb0401ffffa005381c3f0ae2a Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 2 Jul 2016 09:46:56 -0300 Subject: [PATCH] test --- basilisk/basilisk.h | 2 +- basilisk/basilisk_DEX.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/basilisk/basilisk.h b/basilisk/basilisk.h index 72330a4d0..b693da683 100755 --- a/basilisk/basilisk.h +++ b/basilisk/basilisk.h @@ -40,7 +40,7 @@ struct basilisk_request { - uint32_t requestid,timestamp,quoteid,pad; // 0 to 15 + uint32_t requestid,timestamp,quoteid,quotetime; // 0 to 15 uint64_t srcamount,minamount; // 16 to 31 bits256 hash; // 32 to 63 bits256 desthash; diff --git a/basilisk/basilisk_DEX.c b/basilisk/basilisk_DEX.c index 73af56722..29e2f57f5 100755 --- a/basilisk/basilisk_DEX.c +++ b/basilisk/basilisk_DEX.c @@ -21,7 +21,7 @@ uint32_t basilisk_requestid(struct basilisk_request *rp) { struct basilisk_request R; R = *rp; - R.requestid = R.quoteid = R.pad = 0; + R.requestid = R.quoteid = R.quotetime = 0; //R.volatile_start = 0; //memset(R.message,0,sizeof(R.message)); R.destamount = 0; @@ -42,7 +42,7 @@ uint32_t basilisk_quoteid(struct basilisk_request *rp) { struct basilisk_request R; R = *rp; - R.requestid = R.quoteid = R.relaybits = R.pad = 0; + R.requestid = R.quoteid = R.relaybits = 0; //memset(R.message,0,sizeof(R.message)); return(calc_crc32(0,(void *)&R,sizeof(R))); } @@ -66,7 +66,6 @@ int32_t basilisk_rwDEXquote(int32_t rwflag,uint8_t *serialized,struct basilisk_r } else { - rp->pad = 0; memcpy(rp->src,&serialized[len],sizeof(rp->src)), len += sizeof(rp->src); memcpy(rp->dest,&serialized[len],sizeof(rp->dest)), len += sizeof(rp->dest); } @@ -701,6 +700,7 @@ double basilisk_request_listprocess(struct supernet_info *myinfo,struct basilisk *issueR = list[0]; issueR->desthash = myinfo->myaddr.persistent; issueR->destamount = destamount; + issueR->quotetime = (uint32_t)time(NULL); } } else if ( myrequest != 0 && pendingid == 0 && maxi >= 0 ) // automatch best quote @@ -768,10 +768,10 @@ void basilisk_requests_poll(struct supernet_info *myinfo) if ( (retstr= InstantDEX_accept(myinfo,0,0,0,issueR.requestid,issueR.quoteid)) != 0 ) free(retstr); } - else if ( issueR.quoteid == 0 ) + else //if ( issueR.quoteid == 0 ) { if ( (retstr= basilisk_start(myinfo,&issueR,0)) != 0 ) free(retstr); - } else printf("basilisk_requests_poll unexpected hwm issueR\n"); + } //else printf("basilisk_requests_poll unexpected hwm issueR\n"); } }