From bed86aa8d4416235976c5144025db34b6fa60e0d Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 19 Sep 2016 08:57:32 -0300 Subject: [PATCH] test --- basilisk/basilisk.c | 2 +- iguana/main.c | 2 ++ iguana/tests/getinfoN_7776 | 1 + iguana/tests/notaryinit | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) create mode 100755 iguana/tests/getinfoN_7776 diff --git a/basilisk/basilisk.c b/basilisk/basilisk.c index f1a90c013..fe837f94f 100755 --- a/basilisk/basilisk.c +++ b/basilisk/basilisk.c @@ -871,7 +871,7 @@ void basilisks_loop(void *arg) } //portable_mutex_unlock(&myinfo->allcoins_mutex); basilisk_ping_send(myinfo,notary); - } else printf("not notary %p %d\n",notary,myinfo->NOTARY.RELAYID); + } // else printf("not notary %p %d\n",notary,myinfo->NOTARY.RELAYID); if ( myinfo->expiration != 0 ) { HASH_ITER(hh,myinfo->allcoins,coin,tmpcoin) diff --git a/iguana/main.c b/iguana/main.c index 7a9fe8c59..09a3b7982 100755 --- a/iguana/main.c +++ b/iguana/main.c @@ -1408,6 +1408,8 @@ ZERO_ARGS(SuperNET,activehandle) retjson = SuperNET_rosettajson(myinfo,myinfo->persistent_priv,0); jaddstr(retjson,"result","success"); jaddstr(retjson,"handle",myinfo->handle); + if ( myinfo->ipaddr[0] != 0 ) + jaddstr(retjson,"myip",myinfo->ipaddr); jaddbits256(retjson,"persistent",myinfo->myaddr.persistent); if ( myinfo->expiration != 0 ) { diff --git a/iguana/tests/getinfoN_7776 b/iguana/tests/getinfoN_7776 new file mode 100755 index 000000000..4173e1830 --- /dev/null +++ b/iguana/tests/getinfoN_7776 @@ -0,0 +1 @@ +curl --url "http://127.0.0.1:7776" --data "{\"coin\":\"NOTARY\",\"method\":\"getinfo\",\"params\":[]}" diff --git a/iguana/tests/notaryinit b/iguana/tests/notaryinit index 1ba47e238..c5b7a095b 100755 --- a/iguana/tests/notaryinit +++ b/iguana/tests/notaryinit @@ -5,3 +5,4 @@ sleep 3 coins/gennotary curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"SuperNET\",\"method\":\"myipaddr\",\"ipaddr\":\"$myip\"}" tests/addnotarys_7776 +tests/getinfoN_7776