Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nucleo
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blockchain
nucleo
Commits
7977e374
Commit
7977e374
authored
6 years ago
by
Robert Martin-Legene
Browse files
Options
Downloads
Patches
Plain Diff
start.sh now loops forever, because geth is prone to die
parent
8d63fd95
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/start.sh
+59
-51
59 additions, 51 deletions
bin/start.sh
with
59 additions
and
51 deletions
bin/start.sh
+
59
−
51
View file @
7977e374
...
@@ -11,65 +11,73 @@ bootnodes="enode://${bootnodeid}@[$bootnodev6]:${bootnodeport},enode://${bootnod
...
@@ -11,65 +11,73 @@ bootnodes="enode://${bootnodeid}@[$bootnodev6]:${bootnodeport},enode://${bootnod
bfaconfig max
bfaconfig max
accts
=
function
startgeth
for
file
in
${
BFANODEDIR
}
/keystore/
*
--
*
{
do
while
:
do
echo
echo
'***'
echo
set
-x
geth
\
--datadir
${
BFANODEDIR
}
\
$(
accountlist
)
\
$(
miner
)
\
--networkid
$BFANETWORKID
\
--rpc
\
--rpcport
$rpcport
\
--rpcapi
"eth,net,web3,admin,clique,miner"
\
--port
$netport
\
--syncmode
full
\
--nousb
\
--bootnodes
"
${
bootnodes
}
"
\
--txpool
.nolocals
\
--txpool
.accountslots 128
\
--txpool
.globalslots 32768
\
--txpool
.accountqueue 512
\
--txpool
.globalqueue 8192
\
--extradata
"
${
BFAEXTRADATA
}
"
\
--cache
512
\
--verbosity
3 &
set
+x
echo
$!
>
${
BFANODEDIR
}
/geth.pid
wait
sleep
60
done
}
function
accountlist
{
local
accts
=
for
file
in
${
BFANODEDIR
}
/keystore/
*
--
*
do
if
[
-r
"
$file
"
]
if
[
-r
"
$file
"
]
then
then
acct
=
$(
echo
$file
|
sed
's/^.*--//'
)
acct
=
$(
echo
$file
|
sed
's/^.*--//'
)
accts
=
"
${
accts
}
,
${
acct
}
"
accts
=
"
${
accts
}
,
${
acct
}
"
fi
fi
done
done
# also, strip first comma
# strip first comma
accts
=
"--unlock
${
accts
:1
}
"
echo
"--password /dev/null --unlock
${
accts
:1
}
"
}
# touch the "miner" file if you are authorized to mine
# touch the "miner" file if you are authorized to mine
# If you don't want to restart after touching the file,
# If you don't want to restart after touching the file,
# you can use attach.sh and issue the command:
# you can use attach.sh and issue the command:
# miner.start()
# miner.start()
miner
=
if
[
-e
"
${
BFANODEDIR
}
/miner"
]
then
miner
=
"--miner"
fi
(
function
miner
echo
{
echo
'***'
if
[
-e
"
${
BFANODEDIR
}
/miner"
]
echo
then
# Start the miner.
echo
--
"--miner"
test
-e
"
${
BFANODEDIR
}
/geth.pid"
||
fi
touch
${
BFANODEDIR
}
/geth.pid
}
set
-x
flock
--nonblock
--exclusive
${
BFANODEDIR
}
/geth.pid
\
# Start the miner.
geth
\
test
-e
"
${
BFANODEDIR
}
/geth.pid"
||
--datadir
${
BFANODEDIR
}
\
touch
${
BFANODEDIR
}
/geth.pid
$accts
\
flock
--nonblock
--exclusive
${
BFANODEDIR
}
/geth.pid startgeth 2>&1 |
--password
/dev/null
\
$miner
\
--networkid
$BFANETWORKID
\
--rpc
\
--rpcport
$rpcport
\
--rpcapi
"eth,net,web3,admin,clique,miner"
\
--port
$netport
\
--syncmode
full
\
--nousb
\
--bootnodes
"
${
bootnodes
}
"
\
--txpool
.nolocals
\
--txpool
.accountslots 128
\
--txpool
.globalslots 32768
\
--txpool
.accountqueue 512
\
--txpool
.globalqueue 8192
\
--extradata
"
${
BFAEXTRADATA
}
"
\
--cache
512
\
--verbosity
3 &
set
+x
pid_flock
=
$!
pid_geth
=
$(
ps
-eo
ppid,pid |
awk
"/
$pid_flock
/{print
\$
2}"
|
tail
-1
)
if
[
-n
"
$pid_geth
"
]
then
echo
$pid_geth
>
${
BFANODEDIR
}
/geth.pid
fi
)
2>&1 |
${
BFAHOME
}
/bin/log.sh
${
BFANODEDIR
}
/log &
${
BFAHOME
}
/bin/log.sh
${
BFANODEDIR
}
/log &
if
[
-t
1
]
if
[
-t
1
]
then
then
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment