diff --git a/bin/start.sh b/bin/start.sh index 1fd7c88691eb2e73cc0b36c0436d67ebff5d914e..dc7d901674dca8e5c4f9738961de2ba2ca3e9820 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 \