From 3ef32ef712bde6ab7e4a9f744a44f84c9d448191 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 26 Dec 2016 15:41:57 +0200 Subject: [PATCH] test --- basilisk/basilisk_bitcoin.c | 3 ++- iguana/iguana_msg.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/basilisk/basilisk_bitcoin.c b/basilisk/basilisk_bitcoin.c index e7813cc76..5a452141a 100755 --- a/basilisk/basilisk_bitcoin.c +++ b/basilisk/basilisk_bitcoin.c @@ -942,6 +942,7 @@ HASH_ARRAY_STRING(basilisk,value,hash,vals,hexstr) { if ( (txoutjson= cJSON_Parse(retstr)) != 0 ) { + printf("TX.(%s)\n",jprint(txoutjson,0)); if ( (array= jarray(&n,txoutjson,"vout")) != 0 && vout < n && (txjson= jitem(array,vout)) != 0 ) { retjson = cJSON_CreateObject(); @@ -966,7 +967,7 @@ HASH_ARRAY_STRING(basilisk,value,hash,vals,hexstr) } free_json(txoutjson); } - free(retstr); + return(retstr); } } return(basilisk_standardservice("VAL",myinfo,0,hash,vals,hexstr,1)); diff --git a/iguana/iguana_msg.c b/iguana/iguana_msg.c index 2c67a3d59..f9a46eec0 100755 --- a/iguana/iguana_msg.c +++ b/iguana/iguana_msg.c @@ -325,7 +325,7 @@ int32_t iguana_rwmsgalert(struct iguana_info *coin,int32_t rwflag,uint8_t *seria printf("%02x",coin->chain->alertpubkey[i]); char str[65]; printf(" alertpubkey.%d, alerthash2.%s\n",plen,bits256_str(str,alerthash2)); } else msg->siglen = 0; - printf(" ALERT v.%d relay.%lld expires.%lld ID.%d cancel.%d numlist.%d minver.%d maxver.%d subver.(%s) priority.%d comment.(%s) STATUS.(%s) reserved.(%s)\n",msg->version,(long long)msg->relayuntil,(long long)msg->expiration,msg->ID,msg->cancel,msg->numcancellist,msg->minver,msg->maxver,msg->subver,msg->priority,msg->comment,msg->statusbar,msg->reserved); + //printf(" ALERT v.%d relay.%lld expires.%lld ID.%d cancel.%d numlist.%d minver.%d maxver.%d subver.(%s) priority.%d comment.(%s) STATUS.(%s) reserved.(%s)\n",msg->version,(long long)msg->relayuntil,(long long)msg->expiration,msg->ID,msg->cancel,msg->numcancellist,msg->minver,msg->maxver,msg->subver,msg->priority,msg->comment,msg->statusbar,msg->reserved); return(len); } @@ -1251,7 +1251,7 @@ int32_t iguana_msgparser(struct supernet_info *myinfo,struct iguana_info *coin,s //printf("error.(%s) (%s): len.%d != recvlen.%d\n",H->command,addr->ipaddr,len,recvlen); //for (i=0; icommand,"addr") != 0 && (coin->chain->auxpow == 0 || strcmp(H->command,"headers") != 0) ) + if ( len != 0 && strcmp(H->command,"addr") != 0 && (coin->chain->auxpow == 0 || strcmp(H->command,"headers") != 0) && strcmp(H->command,"alert") != 0 ) printf("%s %s.%s len mismatch %d != %d\n",coin->symbol,addr!=0?addr->ipaddr:"local",H->command,len,recvlen); } else if ( len != recvlen && recvlen > 1 )