Last active
April 4, 2019 09:52
-
-
Save nzpr/bd3ac460cd454a9adb9636bedd5a4969 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!/bin/bash | |
echo "----Bash version ${BASH_VERSION}..." | |
source <(curl -s https://gist.githubusercontent.com/nzpr/ce9781316246e94d69147ca7276662d7/raw/0d5815acb984094b34003866d23001743aa55bb3/testnet_data.txt) | |
echo "----PATH populated..." | |
my_addr=$MYREVADDRESS | |
curl -s https://gist.githubusercontent.com/nzpr/5546ca2726ee39848d33541d637b557e/raw/e1476a6590b6c52b36594ffe8703bdc63a3647a9/send_rev.sh > send_rev.sh | |
#every 1 minute | |
while [ 1 ]; do | |
#send some REV to random address (from known network users) via every validator | |
for i in $( seq 1 $VALIDATORS_NUM ); do | |
i=$((i-1)) | |
user_num=$(($RANDOM % $USERS_NUM)) #random user number | |
validator_url=$VALIDATOR_NAME_PRE$i$VALIDATOR_NAME_POST #validator url | |
address_to=$(eval "echo \$$(echo USER${user_num}_ADDRESS)") | |
echo "----Deploying payment to user" $user_num "(address" $rev_address ") to" $validator_url "..." | |
./send_rev.sh $validator_url $my_addr $address_to 2 | |
echo "----Done..." | |
echo "" | |
done | |
sleep 1m | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment