diff --git a/README.md b/README.md index 4145b8496..02e8c4218 100755 --- a/README.md +++ b/README.md @@ -159,7 +159,7 @@ the idea is to issue a curl command into a /tmp/file and then use jsoncmp to ver ##### ../agents/iguana notary 0.Have iguana installed at http://wiki.supernet.org/wiki/How_To_Install_Iguana_on_Linux also install nanomsg: sudo apt-get install libnanomsg-dev -ports 7774 and 7775 will be used +ports 7775 will be used cd Supernet/iguana --> diff --git a/iguana/iguana_notary.c b/iguana/iguana_notary.c index bcb964d4f..0197cf04f 100755 --- a/iguana/iguana_notary.c +++ b/iguana/iguana_notary.c @@ -44,6 +44,11 @@ char *nanomsg_tcpname(char *str,char *ipaddr) void dpow_nanomsginit(struct supernet_info *myinfo,char *ipaddr) { char str[512]; int32_t timeout,retval; + if ( myinfo->ipaddr[0] == 0 ) + { + printf("need to set ipaddr before nanomsg\n"); + return; + } if ( myinfo->DPOW.sock < 0 && (myinfo->DPOW.sock= nn_socket(AF_SP,NN_BUS)) >= 0 ) { if ( nn_bind(myinfo->DPOW.sock,nanomsg_tcpname(str,myinfo->ipaddr)) < 0 ) @@ -1494,6 +1499,7 @@ TWO_STRINGS(komodo,passthru,function,hex) STRING_ARG(iguana,addnotary,ipaddr) { + printf("addnotary (%s) -> (%s)\n",ipaddr,myinfo->ipaddr); dpow_nanomsginit(myinfo,ipaddr); return(clonestr("{\"result\":\"notary node added\"}")); } diff --git a/iguana/ni b/iguana/ni index 14a2efc60..b119d21b0 100755 --- a/iguana/ni +++ b/iguana/ni @@ -3,9 +3,9 @@ myip=`cat myip.txt` #../agents/iguana notary & sleep 4 #coins/gennotary +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"SuperNET\",\"method\":\"myipaddr\",\"ipaddr\":\"$myip\"}" tests/addnotarys_7776 #tests/getinfoN_7776 -curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"SuperNET\",\"method\":\"myipaddr\",\"ipaddr\":\"$myip\"}" ./wp_7776 curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"SuperNET\",\"method\":\"activehandle\"}" ./btc_7776