Last active
March 18, 2021 22:10
-
-
Save nickhough/8aeae7ddc6452d95b22f2bb0924fd3ff to your computer and use it in GitHub Desktop.
Helium Validator Chain Restart - For validators built from source
This file contains hidden or 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 | |
# Validator Restart | |
echo "\nValidator Restart\n" | |
cd ~/miner && | |
echo "Git Pull.\n" && | |
git pull && | |
echo "Building release.\n" && | |
./rebar3 as validator release && | |
echo "Deleting miner data directory.\n" && | |
rm -rf ./_build/validator/rel/miner/data/ | |
echo "Stopping miner.\n" && | |
./_build/validator/rel/miner/bin/miner stop && | |
echo "Starting miner.\n" && | |
./_build/validator/rel/miner/bin/miner start && | |
echo "Remove old genesis block.\n" && | |
rm ./genesis.testnet && | |
echo "Getting genesis block.\n" && | |
wget https://snapshots.helium.wtf/genesis.testnet && | |
echo "Loading genesis block.\n" && | |
./_build/validator/rel/miner/bin/miner genesis load </absolute/path/to/genesis.testnet> | |
echo "Validator Status\n" && | |
./_build/validator/rel/miner/bin/miner info p2p_status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment