jl777 8 years ago
parent
commit
7fc9269e9c
  1. 2
      README.md
  2. 6
      iguana/iguana_notary.c
  3. 2
      iguana/ni

2
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 -->

6
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\"}"));
}

2
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

Loading…
Cancel
Save