From a72a3bfa0f7c394a0137b7bcf18d4806530631c1 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 12 Jun 2016 05:30:45 -0300 Subject: [PATCH] test --- basilisk/basilisk.c | 10 +++++++++- iguana/main.c | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/basilisk/basilisk.c b/basilisk/basilisk.c index 6ede3cb78..d0193e2dd 100755 --- a/basilisk/basilisk.c +++ b/basilisk/basilisk.c @@ -1008,7 +1008,10 @@ void basilisk_msgprocess(struct supernet_info *myinfo,void *addr,uint32_t sender if ( myinfo->IAMRELAY != 0 ) // iguana node { if ( from_basilisk != 0 ) + { + printf("echo to other relays\n"); basilisk_sendcmd(myinfo,0,cmd,&basilisktag,0,0,origdata,origlen,-1,0); // to other iguanas + } if ( (retstr= (*basilisk_services[i][1])(myinfo,type,addr,remoteaddr,basilisktag,valsobj,data,datalen,hash,from_basilisk)) != 0 ) { printf("from_basilisk.%d ret.(%s)\n",from_basilisk,retstr); @@ -1016,7 +1019,7 @@ void basilisk_msgprocess(struct supernet_info *myinfo,void *addr,uint32_t sender basilisk_sendback(myinfo,symbol,remoteaddr,basilisktag,retstr); if ( retstr != 0 ) free(retstr); - } + } else printf("services null return\n"); } else printf("non-relay got unexpected.(%s)\n",type); free_json(valsobj); if ( coin != 0 ) @@ -1033,6 +1036,11 @@ void basilisk_msgprocess(struct supernet_info *myinfo,void *addr,uint32_t sender } else if ( coin->RELAYNODE != 0 || coin->VALIDATENODE != 0 ) // iguana node { + if ( from_basilisk != 0 ) + { + printf("echo to other relays\n"); + basilisk_sendcmd(myinfo,0,cmd,&basilisktag,0,0,origdata,origlen,-1,0); // to other iguanas + } for (i=0; irpcport)) != 0 ) { free(str); - if ( 0 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"portp2p\":8333,\"RELAY\":0,\"VALIDATE\":0,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":1,\"endpend\":1,\"services\":128,\"maxpeers\":64,\"newcoin\":\"BTC\",\"active\":0,\"numhelpers\":4,\"poll\":100}"),0,myinfo->rpcport)) != 0 ) + if ( 1 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"portp2p\":8333,\"RELAY\":0,\"VALIDATE\":0,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":1,\"endpend\":1,\"services\":128,\"maxpeers\":64,\"newcoin\":\"BTC\",\"active\":0,\"numhelpers\":4,\"poll\":100}"),0,myinfo->rpcport)) != 0 ) { free(str); if ( 0 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"agent\":\"SuperNET\",\"method\":\"login\",\"handle\":\"alice\",\"password\":\"alice\",\"passphrase\":\"alice\"}"),0,myinfo->rpcport)) != 0 )