From 11478ff14922b868e63db7bc8154fd1dcdb3b22c Mon Sep 17 00:00:00 2001 From: Robert Martin-Legene <robert@nic.ar> Date: Fri, 27 Jul 2018 18:20:58 -0300 Subject: [PATCH] Syncmode can now be specified in a file, and now defaults to fast --- bin/start.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bin/start.sh b/bin/start.sh index 1fd7c88..dc7d901 100755 --- a/bin/start.sh +++ b/bin/start.sh @@ -31,7 +31,7 @@ function accountlist # you can use attach.sh and issue the command: # miner.start() -function miner +function getminer { if [ -e "${BFANODEDIR}/miner" ] then @@ -39,6 +39,12 @@ function miner fi } +function getsyncmode +{ + local syncmode=$( cat "${BFANODEDIR}/syncmode" 2>/dev/null ) + syncmode=${syncmode:-fast} + echo -- "--syncmode ${syncmode}" +} # Start the miner. @@ -54,7 +60,7 @@ function miner echo echo '***' echo - flexargs="$( accountlist) $( miner )" + flexargs="$( accountlist) $( getminer ) $( getsyncmode )" set -x geth \ --datadir ${BFANODEDIR} \ @@ -65,7 +71,6 @@ function miner --rpcport $rpcport \ --rpcapi "eth,net,web3,admin,clique,miner" \ --port $netport \ - --syncmode full \ --nousb \ --txpool.nolocals \ --txpool.accountslots 128 \ -- GitLab