Browse Source

Make splitfunds work on primary or secondary iguana port

master
Luke Childs 5 years ago
parent
commit
66ae97d4b7
  1. 10
      getiguanaport.sh
  2. 4
      splitfunds.sh

10
getiguanaport.sh

@ -0,0 +1,10 @@
#!/bin/bash
cd "${BASH_SOURCE%/*}" || exit
server_type=$(cat server_type.txt)
if [[ "${server_type}" = "primary" ]]; then
echo 7776
elif [[ "${server_type}" = "secondary" ]]; then
echo 7779
fi

4
splitfunds.sh

@ -4,6 +4,8 @@ cd "${BASH_SOURCE%/*}" || exit
coin=$1 coin=$1
duplicates=$2 duplicates=$2
iguana_port=$(./getiguanaport.sh)
utxo_size=10000 utxo_size=10000
if [[ ${coin} = "GAME" ]]; then if [[ ${coin} = "GAME" ]]; then
utxo_size=100000 utxo_size=100000
@ -12,4 +14,4 @@ if [[ ${coin} = "EMC2" ]]; then
utxo_size=100000 utxo_size=100000
fi fi
curl http://127.0.0.1:7776 --silent --data "{\"coin\":\"${coin}\",\"agent\":\"iguana\",\"method\":\"splitfunds\",\"satoshis\":${utxo_size},\"sendflag\":1,\"duplicates\":${duplicates}}" curl "http://127.0.0.1:$iguana_port" --silent --data "{\"coin\":\"${coin}\",\"agent\":\"iguana\",\"method\":\"splitfunds\",\"satoshis\":${utxo_size},\"sendflag\":1,\"duplicates\":${duplicates}}"

Loading…
Cancel
Save