Skip to content

Commit

Permalink
Skip offline transaction on migration
Browse files Browse the repository at this point in the history
  • Loading branch information
hsoerensen committed Sep 17, 2024
1 parent 7c48d17 commit 93fbcc1
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -543,28 +543,28 @@ ensure_accounts_are_offline() {
return
fi

if [[ ${container_id} == "" ]]; then
echo "Skipping account offline check as no existing Voi Swarm container could be found."
return
fi

display_banner "Migrating to new network. Ensuring all accounts are offline."

echo "Checking if accounts are online and have a balance of 1,000 microVoi or more."
echo "Accounts with a balance of 1,000 microVoi or more will be taken offline."

for account in ${account_addresses}; do
local balance
balance=$(get_account_balance "${account}")
account_status=$(execute_docker_command "/node/bin/goal account dump -a ${account}" | jq -r .onl)
# if [[ ${container_id} == "" ]]; then
# echo "Skipping account offline check as no existing Voi Swarm container could be found."
# return
# fi

if [[ ${balance} -ge 1000 && ${account_status} -eq 1 ]]; then
echo ""
echo "Balance is ${balance} which is above 1,000 microVoi. Taking account ${account} offline."
execute_interactive_docker_command "/node/bin/goal account changeonlinestatus -a ${account} -o=false"
echo "Account ${account} is now offline!"
fi
done
# display_banner "Migrating to new network. Ensuring all accounts are offline."
#
# echo "Checking if accounts are online and have a balance of 1,000 microVoi or more."
# echo "Accounts with a balance of 1,000 microVoi or more will be taken offline."
#
# for account in ${account_addresses}; do
# local balance
# balance=$(get_account_balance "${account}")
# account_status=$(execute_docker_command "/node/bin/goal account dump -a ${account}" | jq -r .onl)
#
# if [[ ${balance} -ge 1000 && ${account_status} -eq 1 ]]; then
# echo ""
# echo "Balance is ${balance} which is above 1,000 microVoi. Taking account ${account} offline."
# execute_interactive_docker_command "/node/bin/goal account changeonlinestatus -a ${account} -o=false"
# echo "Account ${account} is now offline!"
# fi
# done
}

get_participation_key_id_from_vote_key() {
Expand Down

0 comments on commit 93fbcc1

Please sign in to comment.