From 45e7104a698666eeee3cf05b7664650605ddc590 Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Sat, 13 Jul 2019 08:22:48 +0800 Subject: [PATCH 1/2] change m_notary_3rdparty to work the same as m_notary --- iguana/dpowassets_3rdparty | 12 ++++++++++++ iguana/m_notary_3rdparty | 22 ++++++++-------------- 2 files changed, 20 insertions(+), 14 deletions(-) create mode 100755 iguana/dpowassets_3rdparty diff --git a/iguana/dpowassets_3rdparty b/iguana/dpowassets_3rdparty new file mode 100755 index 000000000..e745d1a43 --- /dev/null +++ b/iguana/dpowassets_3rdparty @@ -0,0 +1,12 @@ +#!/bin/bash +# dpow for 3rd party coins. +set -x +source pubkey.txt +echo $pubkey +sleep 3 + +curl --url "http://127.0.0.1:7779" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CHIPS\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7779" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"GAME\",\"freq\":5,\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7779" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"EMC2\",\"freq\":5,\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7779" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"GIN\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7779" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"VRSC\",\"freq\":10,\"pubkey\":\"$pubkey\"}" diff --git a/iguana/m_notary_3rdparty b/iguana/m_notary_3rdparty index fb4fd21a4..c6b79ccd6 100755 --- a/iguana/m_notary_3rdparty +++ b/iguana/m_notary_3rdparty @@ -1,9 +1,13 @@ #!/bin/bash -# manually kill the iguana you need to restart first! -# unlock any locked utxos. This will unlock utxos for both pubkeys, need a filter for address to only unlock the pubkey you need to restart. +pkill -15 iguana +rm -f ../agents/iguana *.o +git pull +./m_notary_build + +# unlock any locked utxos. komodo-cli lockunspent true `komodo-cli listlockunspent | jq -c .` -# Start 3rd party iguana, no split is default on this branch. This uses RPC port 7779, allows 2 iguana on same OS, incase OP does not have capacity to use 2 VM or 2 servers. +# Start 3rd party iguana,This uses RPC port 7779. stdbuf -oL $1 ../agents/iguana 3rd_party & #> iguana.log 2> error.log & myip=`curl -s4 checkip.amazonaws.com` @@ -13,7 +17,7 @@ sleep 4 curl --url "http://127.0.0.1:7779" --data "{\"agent\":\"SuperNET\",\"method\":\"myipaddr\",\"ipaddr\":\"$myip\"}" sleep 3 -# TODO: Need to get some seeds for both networks. +# TODO: Need to get some more seeds for both networks. curl --url "http://127.0.0.1:7779" --data "{\"agent\":\"iguana\",\"method\":\"addnotary\",\"ipaddr\":\"103.6.12.117\"}" curl --url "http://127.0.0.1:7779" --data "{\"agent\":\"iguana\",\"method\":\"addnotary\",\"ipaddr\":\"185.137.233.199\"}" curl --url "http://127.0.0.1:7779" --data "{\"agent\":\"iguana\",\"method\":\"addnotary\",\"ipaddr\":\"151.80.108.76\"}" @@ -33,13 +37,3 @@ coins/gin_7779 coins/vrsc_7779 sleep 30 - -# dpow for 3rd party coins. -source pubkey.txt -echo $pubkey -sleep 3 -curl --url "http://127.0.0.1:7779" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CHIPS\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7779" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"GAME\",\"freq\":5,\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7779" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"EMC2\",\"freq\":5,\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7779" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"GIN\",\"pubkey\":\"$pubkey\"}" -curl --url "http://127.0.0.1:7779" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"VRSC\",\"freq\":10,\"pubkey\":\"$pubkey\"}" From 6ec7d2d07ba69de57f323d3509824da849f95844 Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Sat, 13 Jul 2019 09:08:07 +0800 Subject: [PATCH 2/2] fix for checkmasks crash --- iguana/iguana_notary.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/iguana/iguana_notary.c b/iguana/iguana_notary.c index 0907b2620..aa69363bd 100755 --- a/iguana/iguana_notary.c +++ b/iguana/iguana_notary.c @@ -905,6 +905,8 @@ STRING_ARG(dpow,active,maskhex) free_json(infojson); } else return(clonestr("{\"error\":\"cant get current height\"}")); n = komodo_notaries("KMD",pubkeys,current); + if ( myinfo->DPOWS[0]->currentbp == 0 ) + return(clonestr("{\"error\":\"there is no dpow round yet started to check.\"}")); if ( maskhex == 0 || maskhex[0] == 0 ) { return(jprint(dpow_recvmasks(myinfo,myinfo->DPOWS[0],myinfo->DPOWS[0]->currentbp),1));