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

Moved extradata into a separate function

parent ecaca570
No related branches found
No related tags found
No related merge requests found
......@@ -188,14 +188,17 @@ function nodedir
test -r "${BFANODEDIR}/rpcport" ||
echo $(( $RANDOM / 2 + 12345 )) > ${BFANODEDIR}/rpcport
rpcport=$( cat ${BFANODEDIR}/rpcport )
}
function extradata
{
account
# something uniqueish
## find default interface
local def_if=$( ( ip -4 route show ; ip -6 route show ) | expand | sed -ne '/^default /{s/ */ /g;s/^.* dev //;s/ .*//;p;q}' )
local mymac=$( ip link show ${def_if} | sed -ne '/link\|ether/{s/^.*link.ether //;s/ .*//;s/://g;p;q}' )
BFAEXTRADATA="${USER}@${HOSTNAME}"
BFAEXTRADATA="${BFAEXTRADATA} "
BFAEXTRADATA="${BFAEXTRADATA:0:19} ${mymac}"
#
echo -n "${account:0:19} ${mymac:0:12}"
}
function account
......
......@@ -61,7 +61,7 @@ function getsyncmode
echo '***'
echo
# (re)configure parameters (you never know if they changed)
flexargs="$( accountlist) $( getminer ) $( getsyncmode )"
flexargs="$( accountlist) $( getminer ) $( getsyncmode ) --extradata $( extradata )" \
set -x
geth \
--datadir ${BFANODEDIR} \
......@@ -78,7 +78,6 @@ function getsyncmode
--txpool.globalslots 32768 \
--txpool.accountqueue 512 \
--txpool.globalqueue 8192 \
--extradata "${BFAEXTRADATA}" \
--gcmode archive \
--cache 512 \
--verbosity 3 &
......
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