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

Improving setup

parent 27d0043c
No related branches found
No related tags found
No related merge requests found
......@@ -154,7 +154,7 @@ function gotAdminPeers( err, nodelist )
writeStatus( nowpeers );
writePeersCache( newoutpeers.concat(peerscache) );
// Try to connect to a random node if we have very few peers
if ( nowpeers.length < 5 )
if ( nowpeers.length < 1 )
{
var candidate = [];
// find candidate nodes which we can connect to
......
......@@ -62,14 +62,14 @@ function startmonitor
return
fi
local ERRTEXT="monitor section failed"
local pidfile=${BFANETWORKDIR}/monitor.pid
local pidfile=${BFANODEDIR}/monitor.pid
(
flock --nonblock --exclusive 9 || (
echo "A monitor is already running."
false
) || exit
(
echo ${BASHPID} > ${BFANETWORKDIR}/start-monitor-loop.pid
echo ${BASHPID} > ${BFANODEDIR}/start-monitor-loop.pid
while :
do
monitor.js &
......@@ -155,7 +155,7 @@ function startgeth
{
# Start the node.
local ERRTEXT="geth section failed"
local pidfile=${BFANETWORKDIR}/geth.pid
local pidfile=${BFANODEDIR}/geth.pid
which geth >/dev/null 2>&1 || return 0
#
(
......@@ -167,11 +167,17 @@ function startgeth
then
echo Starting geth
echo Logging everything to ${BFANODEDIR}/log
echo Consider running: bfalog.sh
if [ "$VIRTUALIZATION" = "DOCKER" ]
then
echo Consider running: docker logs --tail 100 -f '<containername>'
else
echo Consider running: bfa tail
fi
fi
loop_counter=0
(
echo ${BASHPID} > ${BFANETWORKDIR}/start-geth-loop.pid
echo ${BASHPID} > ${BFANODEDIR}/start-geth-loop.pid
echo "*** Loop counter starting at $(( loop_counter + 1 ))"
while :
do
loop_counter=$(( ${loop_counter} + 1 ))
......@@ -183,14 +189,7 @@ function startgeth
echo
geth_args
set -x
geth \
--datadir ${BFANODEDIR} \
--networkid ${BFANETWORKID} \
--rpc \
--gcmode archive \
${flexargs} \
--rpccorsdomain \* \
--bootnodes "${bootnodes}" &
geth --config "${BFANETWORKDIR}/config.localhost+full+archive" &
set +x
echo $! > $pidfile
rv=0
......
[Eth]
NetworkId = 47525974938
SyncMode = "full"
NoPruning = true
DatabaseCache = 4096
[Node]
DataDir = "/home/bfa/bfa/network/node"
HTTPHost = "127.0.0.1"
HTTPCors = ["*"]
HTTPVirtualHosts = ["localhost"]
HTTPModules = ["eth", "net", "web3", "clique", "admin", "miner", "personal"]
[Node.P2P]
BootstrapNodes = ["enode://7ec4dd9d5e1a2b29d6b60aa9f95677c0c3a5f9306e73d65dd3bcbfda3737a8c509b02d1eab763ce39f18cfe96423df7ee544d6c36191ec17f59ade75bc99d358@[2800:110:44:6300::aad2:2db3]:30301", "enode://7ec4dd9d5e1a2b29d6b60aa9f95677c0c3a5f9306e73d65dd3bcbfda3737a8c509b02d1eab763ce39f18cfe96423df7ee544d6c36191ec17f59ade75bc99d358@170.210.45.179:30301", "enode://82b66b13d7addcf9ffe1e4e972a105f6ccf50557161c4a0978a5d9ce595ababde609ea8a49897ae89b1d41e90551cb2e9241363238593e950ca68bd5af7c24d6@200.16.28.28:30301", "enode://ddbf37799e8d33b0c42dddbda713037b17d14696b29ecf424ca3d57bb47db78a467505e22c5f2b709a98c3d55ac8ecbf4610765385317dd51049438f498881c6@200.108.146.100:30301"]
BootstrapNodesV5 = ["enode://7ec4dd9d5e1a2b29d6b60aa9f95677c0c3a5f9306e73d65dd3bcbfda3737a8c509b02d1eab763ce39f18cfe96423df7ee544d6c36191ec17f59ade75bc99d358@[2800:110:44:6300::aad2:2db3]:30301", "enode://7ec4dd9d5e1a2b29d6b60aa9f95677c0c3a5f9306e73d65dd3bcbfda3737a8c509b02d1eab763ce39f18cfe96423df7ee544d6c36191ec17f59ade75bc99d358@170.210.45.179:30301", "enode://82b66b13d7addcf9ffe1e4e972a105f6ccf50557161c4a0978a5d9ce595ababde609ea8a49897ae89b1d41e90551cb2e9241363238593e950ca68bd5af7c24d6@200.16.28.28:30301", "enode://ddbf37799e8d33b0c42dddbda713037b17d14696b29ecf424ca3d57bb47db78a467505e22c5f2b709a98c3d55ac8ecbf4610765385317dd51049438f498881c6@200.108.146.100:30301"]
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