From c717b0c622b1a23d73be6996f31f5538d8d5def3 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 1 May 2018 15:25:07 +0300 Subject: [PATCH 1/2] Fix --- iguana/dpow/dpow_network.c | 1 + 1 file changed, 1 insertion(+) diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index 9c1d50c9f..ba1e45668 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -16,6 +16,7 @@ extern uint16_t Notaries_port; extern int32_t Notaries_numseeds; extern char *Notaries_seeds[]; +char *Notaries_elected[65][2]; struct signed_nnpacket { From eb0e36f8a6d52f72b5afd8b6e1cffff4b12c6847 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 1 May 2018 15:53:23 +0300 Subject: [PATCH 2/2] Fix active print --- iguana/dpow/dpow_network.c | 10 +++------- iguana/m_notary_run | 2 ++ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index ba1e45668..e9972454e 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -1781,7 +1781,7 @@ void dpow_ratify_update(struct supernet_info *myinfo,struct dpow_info *dp,struct cJSON *dpow_recvmasks(struct supernet_info *myinfo,struct dpow_info *dp,struct dpow_block *bp) { - int32_t i,j; cJSON *retjson,*item; char hexstr[64]; + int32_t i; cJSON *retjson,*item; char hexstr[64]; retjson = cJSON_CreateArray(); if ( dp == 0 || bp == 0 ) return(retjson); @@ -1790,13 +1790,9 @@ cJSON *dpow_recvmasks(struct supernet_info *myinfo,struct dpow_info *dp,struct d item = cJSON_CreateObject(); jaddstr(item,"notary",Notaries_elected[i][0]); jaddnum(item,"bestk",bp->notaries[i].bestk); - for (j=7; j>=0; j--) - sprintf(hexstr,"%02x",((uint8_t *)&bp->notaries[i].recvmask)[j]); - hexstr[16] = 0; + sprintf(hexstr,"%16llx",(long long)bp->notaries[i].recvmask); jaddstr(item,"recvmask",hexstr); - for (j=7; j>=0; j--) - sprintf(hexstr,"%02x",((uint8_t *)&bp->notaries[i].bestmask)[j]); - hexstr[16] = 0; + sprintf(hexstr,"%16llx",(long long)bp->notaries[i].bestmask); jaddstr(item,"bestmask",hexstr); jaddi(retjson,item); } diff --git a/iguana/m_notary_run b/iguana/m_notary_run index ff82686f5..8f0a152c3 100755 --- a/iguana/m_notary_run +++ b/iguana/m_notary_run @@ -17,6 +17,8 @@ sleep 4 curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"SuperNET\",\"method\":\"myipaddr\",\"ipaddr\":\"$myip\"}" sleep 3 curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"addnotary\",\"ipaddr\":\"78.47.196.146\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"addnotary\",\"ipaddr\":\"82.202.193.98\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"addnotary\",\"ipaddr\":\"54.95.68.31\"}" #tests/addnotarys_7776 coins/btc_7776 #coins/ltc_7776