From ae7dd93462ff64f4991799e8616455bc82a862b2 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 12 Sep 2016 10:08:19 -0300 Subject: [PATCH] test --- basilisk/basilisk.c | 4 ++++ iguana/iguana_msg.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/basilisk/basilisk.c b/basilisk/basilisk.c index b2697b8a3..abcdbaf48 100755 --- a/basilisk/basilisk.c +++ b/basilisk/basilisk.c @@ -162,7 +162,10 @@ int32_t basilisk_sendcmd(struct supernet_info *myinfo,char *destipaddr,char *typ if ( destipaddr != 0 ) { if ( destipaddr[0] == 0 ) + { + printf("map to broadcast\n"); destipaddr = 0; // broadcast + } else if ( strcmp(destipaddr,"127.0.0.1") == 0 || strcmp(destipaddr,myinfo->ipaddr) == 0 ) { printf("return after locally basilisk_msgprocess\n"); @@ -171,6 +174,7 @@ int32_t basilisk_sendcmd(struct supernet_info *myinfo,char *destipaddr,char *typ return(0); } } + printf("basilisk send -> (%s)\n",destipaddr); iguana_rwnum(1,&data[-(int32_t)sizeof(*basilisktagp)],sizeof(*basilisktagp),basilisktagp); if ( *basilisktagp == 0 ) { diff --git a/iguana/iguana_msg.c b/iguana/iguana_msg.c index e26005e9d..7597cec54 100755 --- a/iguana/iguana_msg.c +++ b/iguana/iguana_msg.c @@ -311,7 +311,7 @@ int32_t iguana_rwmsgalert(struct iguana_info *coin,int32_t rwflag,uint8_t *seria void iguana_gotversion(struct supernet_info *myinfo,struct iguana_info *coin,struct iguana_peer *addr,struct iguana_msgversion *vers) { uint8_t serialized[sizeof(struct iguana_msghdr)]; - printf("gotversion from %s: starting height.%d services.%llx proto.%d (%s)\n",addr->ipaddr,vers->nStartingHeight,(long long)vers->nServices,vers->nVersion,vers->strSubVer); + //printf("gotversion from %s: starting height.%d services.%llx proto.%d (%s)\n",addr->ipaddr,vers->nStartingHeight,(long long)vers->nServices,vers->nVersion,vers->strSubVer); if ( strncmp(vers->strSubVer,"/iguana",strlen("/iguana")) == 0 ) addr->supernet = 1, addr->basilisk = 0; else if ( strncmp(vers->strSubVer,"/basilisk",strlen("/basilisk")) == 0 ) @@ -328,7 +328,7 @@ void iguana_gotversion(struct supernet_info *myinfo,struct iguana_info *coin,str iguana_gotdata(coin,addr,addr->height); } iguana_queue_send(addr,0,serialized,"verack",0); - //if ( addr->supernet != 0 || addr->basilisk != 0 ) + if ( addr->supernet != 0 || addr->basilisk != 0 ) printf("height.%d nServices.%lld nonce.%llu %srelay node.(%s) supernet.%d basilisk.%d longest.%u\n",vers->nStartingHeight,(long long)vers->nServices,(long long)vers->nonce,addr->relayflag==0?"non-":"",addr->ipaddr,addr->supernet,addr->basilisk,vers->nStartingHeight); if ( (int32_t)vers->nStartingHeight > coin->longestchain ) {