Browse Source

Merge pull request #1092 from blackjok3rtt/beta

change m_notary_3rd party to work same as m_notary
beta_season3
jl777 6 years ago
committed by GitHub
parent
commit
e56e02a6e0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      iguana/dpowassets_3rdparty
  2. 2
      iguana/iguana_notary.c
  3. 22
      iguana/m_notary_3rdparty

12
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\"}"

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

22
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\"}"

Loading…
Cancel
Save