Browse Source

Hush Smart Chain update

master
Duke Leto 4 years ago
parent
commit
88cfc05b16
  1. 2
      dragon/add_coins
  2. 6
      dragon/assets.sh
  3. 2
      dragon/config.nn.example
  4. 4
      dragon/dpowassets
  5. 4
      dragon/listchainparams
  6. 4
      dragon/listchains
  7. 2
      dragon/notary.sh

2
dragon/add_coins

@ -10,7 +10,7 @@ coins/kmd_7776
coins/btc_7776
# Loop through smartchains.json and build the path to the approptiate coins file and run it.
./listassetchains | while read chain; do
./listchains | while read chain; do
coin="coins/$(echo $chain | awk '{print tolower($0)}')_7776"
$coin
done

6
dragon/assets.sh

@ -6,8 +6,8 @@ source $HOME/config.nn
case "$1" in
start_all)
# Replaces assetchains
./listassetchainparams | while read args; do
# Replaces smartchains
./listchainparams | while read args; do
gen=""
if [ $[RANDOM % 20] == 1 ]; then
gen=" -gen -genproclimit=1"
@ -19,7 +19,7 @@ case "$1" in
all)
# Replaces ./fiat-cli
./listassetchains | while read chain; do
./listchains | while read chain; do
echo $chain
$cli_binary --ac_name=$chain ${*:2}
done

2
dragon/config.nn.example

@ -20,5 +20,5 @@ cli_binary="$HOME/git/hush3/src/komodo-cli"
hush_binary="$HOME/git/hush3/src/hushd"
hush_cli_binary="$HOME/git/hush3/src/hush-cli"
# Delay between starting assetchains. Depends on server specs.
# Delay between starting smartchains. Depends on server specs.
delay=5

4
dragon/dpowassets

@ -5,10 +5,10 @@ source pubkey.txt
echo $pubkey
sleep 3
# add non default assetchains here
# add non default smartchains here
# curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"dragon\",\"method\":\"dpow\",\"symbol\":\"XXX\",\"freq\":10,\"pubkey\":\"$pubkey\"}"
# Loop through smartchains.json and call dpow for them
./listassetchains | while read chain; do
./listchains | while read chain; do
curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"dragon\",\"method\":\"dpow\",\"symbol\":\"$chain\",\"pubkey\":\"$pubkey\"}"
done

4
dragon/listassetchainparams → dragon/listchainparams

@ -7,9 +7,9 @@ def format_param(param, value):
script_dir = os.path.dirname(__file__)
with open(script_dir + '/smartchains.json') as file:
assetchains = json.load(file)
smartchains = json.load(file)
for chain in assetchains:
for chain in smartchains:
params = []
for param, value in chain.items():
if isinstance(value, list):

4
dragon/listassetchains → dragon/listchains

@ -4,7 +4,7 @@ import json
script_dir = os.path.dirname(__file__)
with open(script_dir + '/smartchains.json') as file:
assetchains = json.load(file)
smartchains = json.load(file)
for chain in assetchains:
for chain in smartchains:
print(chain['ac_name'])

2
dragon/notary.sh

@ -51,7 +51,7 @@ case "$1" in
coins/btc_7776
# Loop through smartchains.json and build the path to the approptiate coins file and run it.
./listassetchains | while read chain; do
./listchains | while read chain; do
coin="coins/$(echo $chain | awk '{print tolower($0)}')_7776"
$coin
done

Loading…
Cancel
Save