Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
ae7dd93462
  1. 4
      basilisk/basilisk.c
  2. 4
      iguana/iguana_msg.c

4
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 )
{ {
if ( destipaddr[0] == 0 ) if ( destipaddr[0] == 0 )
{
printf("map to broadcast\n");
destipaddr = 0; // broadcast destipaddr = 0; // broadcast
}
else if ( strcmp(destipaddr,"127.0.0.1") == 0 || strcmp(destipaddr,myinfo->ipaddr) == 0 ) else if ( strcmp(destipaddr,"127.0.0.1") == 0 || strcmp(destipaddr,myinfo->ipaddr) == 0 )
{ {
printf("return after locally basilisk_msgprocess\n"); 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); return(0);
} }
} }
printf("basilisk send -> (%s)\n",destipaddr);
iguana_rwnum(1,&data[-(int32_t)sizeof(*basilisktagp)],sizeof(*basilisktagp),basilisktagp); iguana_rwnum(1,&data[-(int32_t)sizeof(*basilisktagp)],sizeof(*basilisktagp),basilisktagp);
if ( *basilisktagp == 0 ) if ( *basilisktagp == 0 )
{ {

4
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) 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)]; 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 ) if ( strncmp(vers->strSubVer,"/iguana",strlen("/iguana")) == 0 )
addr->supernet = 1, addr->basilisk = 0; addr->supernet = 1, addr->basilisk = 0;
else if ( strncmp(vers->strSubVer,"/basilisk",strlen("/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_gotdata(coin,addr,addr->height);
} }
iguana_queue_send(addr,0,serialized,"verack",0); 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); 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 ) if ( (int32_t)vers->nStartingHeight > coin->longestchain )
{ {

Loading…
Cancel
Save