Skip to content
Snippets Groups Projects
Commit de0eaf7b authored by Robert Martin-Legene's avatar Robert Martin-Legene
Browse files

Moving genesis block creation back into libbfa.sh

parent 3b4684f8
No related branches found
No related tags found
No related merge requests found
#!/bin/bash -x
# Robert Martin-Legene <robert@nic.ar>
if [ -z "${BFAHOME}" ]; then echo "\$BFAHOME not set. Did you source bfa/bin/env ?" >&2; exit 1; fi
source ${BFAHOME}/bin/libbfa.sh || exit 1
if [ -d "${BFANODEDIR}/geth/chaindata" ]
then
mkdir -p "${BFANODEDIR}"
echo "Node is not initialised. Initialising with genesis."
geth --config "${BFANETWORKDIR}/config.toml" --cache 0 init "${BFANETWORKDIR}/genesis.json"
fi
......@@ -192,8 +192,13 @@ function bfainit
echo "Unknown socket type. Supported types are http, ws, ipc" >&2
exit 1
esac
#
generate-genesis-block.sh
# Init the blockchain with the genesis block
if [ -d "${BFANODEDIR}/geth/chaindata" ]
then
mkdir -p "${BFANODEDIR}"
echo "Node is not initialised. Initialising with genesis."
geth --config "${BFANETWORKDIR}/config.toml" --cache 0 init "${BFANETWORKDIR}/genesis.json"
fi
}
if [ -z "$SOURCED_BFAINIT_SH" ]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment