From 0a0f442468a2e7daff1d4f9fe5996fabbaa0e92a Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 3 Jul 2016 01:14:09 -0300 Subject: [PATCH] test --- basilisk/basilisk_MSG.c | 23 +++++++++++------------ basilisk/basilisk_swap.c | 4 +--- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/basilisk/basilisk_MSG.c b/basilisk/basilisk_MSG.c index e366ca03c..6c8081bae 100755 --- a/basilisk/basilisk_MSG.c +++ b/basilisk/basilisk_MSG.c @@ -55,7 +55,7 @@ int32_t basilisk_ping_processMSG(struct supernet_info *myinfo,uint32_t senderipb msg = &data[len], len += msglen; if ( msglen <= 0 || len > datalen ) return(0); - printf("i.%d: keylen.%d msglen.%d\n",i,keylen,msglen); + //printf("i.%d: keylen.%d msglen.%d\n",i,keylen,msglen); basilisk_respond_sendmessage(myinfo,key,keylen,msg,msglen,0); } } @@ -73,7 +73,7 @@ int32_t basilisk_ping_genMSG(struct supernet_info *myinfo,uint8_t *data,int32_t datalen += iguana_rwnum(1,&data[datalen],sizeof(msg->datalen),&msg->datalen); if ( maxlen > datalen+msg->datalen ) { - printf("SEND keylen.%d msglen.%d\n",msg->keylen,msg->datalen); + //printf("SEND keylen.%d msglen.%d\n",msg->keylen,msg->datalen); memcpy(&data[datalen],msg->data,msg->datalen), datalen += msg->datalen; } else @@ -81,11 +81,11 @@ int32_t basilisk_ping_genMSG(struct supernet_info *myinfo,uint8_t *data,int32_t printf("basilisk_ping_genMSG message doesnt fit %d vs %d\n",maxlen,datalen+msg->datalen); datalen = 0; } - printf("\n-> "); - int32_t i; - for (i=0; i "); + //int32_t i; + //for (i=0; imessagemutex); return(jprint(retjson,1)); @@ -128,7 +127,7 @@ char *basilisk_respond_OUT(struct supernet_info *myinfo,char *CMD,void *addr,cha { int32_t keylen; uint8_t key[64]; keylen = basilisk_messagekey(key,hash,valsobj); - printf("keylen.%d datalen.%d\n",keylen,datalen); + //printf("keylen.%d datalen.%d\n",keylen,datalen); return(basilisk_respond_sendmessage(myinfo,key,keylen,data,datalen,1)); } @@ -199,7 +198,7 @@ int32_t basilisk_channelget(struct supernet_info *myinfo,bits256 hash,uint32_t c jaddnum(valsobj,"msgid",msgid); if ( (retstr= basilisk_getmessage(myinfo,0,0,0,hash,valsobj,0)) != 0 ) { - printf("getmessage.(%s)\n",retstr); + //printf("getmessage.(%s)\n",retstr); if ( (retjson= cJSON_Parse(retstr)) != 0 ) { if ( (msgobj= jobj(retjson,"message")) != 0 ) diff --git a/basilisk/basilisk_swap.c b/basilisk/basilisk_swap.c index 26d1a8ac8..5786c2d0c 100755 --- a/basilisk/basilisk_swap.c +++ b/basilisk/basilisk_swap.c @@ -212,7 +212,7 @@ void basilisk_rawtx_setparms(struct supernet_info *myinfo,struct basilisk_swap * if ( rawtx->vouttype <= 1 && rawtx->destaddr[0] != 0 ) { rawtx->spendlen = bitcoin_standardspend(rawtx->spendscript,0,rawtx->rmd160); - if ( 0 && vintype == 0 && basilisk_rawtx_gen("setparms",myinfo,swap,1,rawtx,0,rawtx->spendscript,rawtx->spendlen,coin->chain->txfee,1) < 0 ) + if ( vintype == 0 && basilisk_rawtx_gen("setparms",myinfo,swap,1,rawtx,0,rawtx->spendscript,rawtx->spendlen,coin->chain->txfee,1) < 0 ) printf("error generating vintype.%d vouttype.%d -> %s\n",vintype,vouttype,rawtx->destaddr); } } @@ -405,10 +405,8 @@ int32_t basilisk_swapdata_deck(struct supernet_info *myinfo,struct basilisk_swap int32_t basilisk_verify_otherdeck(struct supernet_info *myinfo,struct basilisk_swap *swap,uint8_t *data,int32_t datalen) { int32_t i,len = 0; - printf("verify otherdeck.%d\n",datalen); for (i=0; iotherdeck)/sizeof(swap->otherdeck[0][0]); i++) len += iguana_rwnum(0,&data[len],sizeof(swap->otherdeck[i>>1][i&1]),&swap->otherdeck[i>>1][i&1]); - printf("verified\n"); return(0); }