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