diff --git a/bin/libbfa.sh b/bin/libbfa.sh index 7a4ba806d63eb9dfdd916e17d381d634d798be76..9b363b63f0ba3a0cca5cbf0ae4dcd71e6d396a26 100644 --- a/bin/libbfa.sh +++ b/bin/libbfa.sh @@ -193,11 +193,11 @@ function bfainit exit 1 esac # Init the blockchain with the genesis block - if [ -d "${BFANODEDIR}/geth/chaindata" ] + if [ ! -d "${BFANODEDIR}/geth/chaindata" ] then mkdir -p "${BFANODEDIR}" echo "Node is not initialised. Initialising with genesis." - geth --config "${BFANETWORKDIR}/config.toml" --networkid ${BFANETWORKID} --cache 0 init "${BFANETWORKDIR}/genesis.json" + geth --config "${BFANETWORKDIR}/config.toml" --cache 0 init "${BFANETWORKDIR}/genesis.json" fi } diff --git a/bin/singlestart.sh b/bin/singlestart.sh index 0a3615724ea88347e04f9c8f7a87024ec3ebca45..d8fb623bf88304d2e37b56e60295157ae28a5174 100755 --- a/bin/singlestart.sh +++ b/bin/singlestart.sh @@ -89,7 +89,7 @@ exec > ${LOGPIPE} 2>&1 echo "*** Starting geth." # "NoPruning=true" means "--gcmode archive" -geth --networkid ${BFANETWORKID} --config ${BFATOML} & +geth --config ${BFATOML} & PIDIDX[$!]="geth" # bootnode