From b50fcf292f6b40fe8d0295f664702e30cd8d7b8a Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 12 Feb 2016 10:56:32 -0300 Subject: [PATCH] test --- iguana/iguana_instantdex.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/iguana/iguana_instantdex.c b/iguana/iguana_instantdex.c index 1faff1b6a..8d64f35d3 100755 --- a/iguana/iguana_instantdex.c +++ b/iguana/iguana_instantdex.c @@ -570,9 +570,10 @@ char *InstantDEX_hexmsg(struct supernet_info *myinfo,void *ptr,int32_t len,char else if ( (signerbits= acct777_validate(&msg->sig,acct777_msgprivkey(serdata,datalen),msg->sig.pubkey)) != 0 ) { flag++; - //printf("InstantDEX_hexmsg <<<<<<<<<<<<< sigsize.%ld VALIDATED [%ld] len.%d t%u allocsize.%d (%s) [%d]\n",sizeof(msg->sig),(long)serdata-(long)msg,datalen,msg->sig.timestamp,msg->sig.allocsize,(char *)msg->serialized,serdata[datalen-1]); + printf("InstantDEX_hexmsg <<<<<<<<<<<<< sigsize.%ld VALIDATED [%ld] len.%d t%u allocsize.%d (%s) [%d]\n",sizeof(msg->sig),(long)serdata-(long)msg,datalen,msg->sig.timestamp,msg->sig.allocsize,(char *)msg->serialized,serdata[datalen-1]); newlen = (int32_t)(msg->sig.allocsize - ((long)msg->serialized - (long)msg)); serdata = msg->serialized; + printf("newlen.%d diff.%ld alloc.%d datalen.%d\n",newlen,((long)msg->serialized - (long)msg),msg->sig.allocsize,datalen); if ( (argjson= cJSON_Parse((char *)serdata)) != 0 ) { slen = (int32_t)strlen((char *)serdata) + 1; @@ -582,9 +583,10 @@ char *InstantDEX_hexmsg(struct supernet_info *myinfo,void *ptr,int32_t len,char if ( newlen > 0 ) { orderhash = instantdex_rwoffer(0,&olen,serdata,&rawoffer); - //printf("received orderhash.%llu\n",(long long)orderhash.txid); newlen -= olen; + newlen -= ((long)msg->serialized - (long)msg); serdata = &serdata[olen]; + printf("received orderhash.%llu olen.%d slen.%d newlen.%d\n",(long long)orderhash.txid,olen,slen,newlen); } else olen = 0; if ( newlen <= 0 ) serdata = 0, newlen = 0;