From a8c4342d565072d84b85aaa337d057c57bd43aa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Martin-Leg=C3=A8ne?= <robert@nic.ar> Date: Thu, 27 Sep 2018 14:47:54 -0300 Subject: [PATCH] Making a simpler admin interface --- README.md | 2 +- bin/{syncmode.sh => admin.sh} | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) rename bin/{syncmode.sh => admin.sh} (100%) diff --git a/README.md b/README.md index 2005694..1480bb6 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ 5. Start synchronizing. Synchronizing can take a while. (This script is automatically run at system restart.) - as bfa: `start.sh` 7. Monitor the logs with `bfalog.sh`. Press CTRL-C at any time to stop the `tail -f`. -8. Change your node's settings with `syncmode.sh` +8. Change your node's settings with `admin.sh syncmode` - Do this before you have synced too much in the step before, as it might remove all your downloaded chain data and restart synchronizing the chain. 9. Wait for it to finish synchronizing. 10. Run `maymine.sh` to update your configuration (detects if you are allowed to seal/mine or not). You can run this as often as you wish. If you try to mine/seal but is not allowed, your log will show errors (but no harm done). diff --git a/bin/syncmode.sh b/bin/admin.sh similarity index 100% rename from bin/syncmode.sh rename to bin/admin.sh index d9747b8..5f443e9 100755 --- a/bin/syncmode.sh +++ b/bin/admin.sh @@ -6,17 +6,6 @@ source ${BFAHOME}/bin/libbfa.sh || exit 1 defaultmode="fast" -echo "Available synchronization modes:" -echo " full : verify all blocks and all transactions since genesis (most secure)" -echo " fast : verify all blocks but not all transactions (faster than full, but less certain)" -echo " light: Makes this node into a light node which downloads almost" -echo " nothing, but relies on fast and full nodes in the network" -echo " to answer it's requests. This is the fastest and uses least" -echo " local resources, but outsources all trust to another node." -echo "Default mode is fast, because for many, it is a healthy compromise" -echo "between speed and paranoia. You can change the setting, according to" -echo "your needs." - function modefilter { case "$mode" in @@ -31,6 +20,17 @@ function modefilter true } +echo "Available synchronization modes:" +echo " full : verify all blocks and all transactions since genesis (most secure)" +echo " fast : verify all blocks but not all transactions (faster than full, but less certain)" +echo " light: Makes this node into a light node which downloads almost" +echo " nothing, but relies on fast and full nodes in the network" +echo " to answer it's requests. This is the fastest and uses least" +echo " local resources, but outsources all trust to another node." +echo "Default mode is fast, because for many, it is a healthy compromise" +echo "between speed and paranoia. You can change the setting, according to" +echo "your needs." + mode=$( cat ${BFANODEDIR}/syncmode 2>/dev/null || true ) mode=${mode:-${defaultmode}} orgmode=$mode -- GitLab