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; i<sizeof(basilisk_coinservices)/sizeof(*basilisk_coinservices); i++) if ( strcmp((char *)basilisk_coinservices[i][0],type) == 0 ) { diff --git a/iguana/main.c b/iguana/main.c index 3a6df609a..6ca24a3ed 100755 --- a/iguana/main.c +++ b/iguana/main.c @@ -1153,7 +1153,7 @@ void iguana_appletests(struct supernet_info *myinfo) if ( 1 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"protover\":70002,\"RELAY\":0,\"VALIDATE\":0,\"portp2p\":14631,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":64,\"endpend\":64,\"services\":129,\"maxpeers\":128,\"newcoin\":\"BTCD\",\"active\":1,\"numhelpers\":4,\"poll\":1}"),0,myinfo->rpcport)) != 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 )