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
41011091
Commit
41011091
authored
6 years ago
by
Robert Martin-Legene
Browse files
Options
Downloads
Patches
Plain Diff
Adding UNC bootnode. Starting bootnode at start (if keyfile exists)
parent
39548d9e
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
+40
-5
40 additions, 5 deletions
bin/start.sh
with
40 additions
and
5 deletions
bin/start.sh
+
40
−
5
View file @
41011091
...
...
@@ -4,7 +4,8 @@ if [ -z "${BFAHOME}" ]; then echo "\$BFAHOME not set. Did you source bfa/bin/env
source
${
BFAHOME
}
/bin/libbfa.sh
||
exit
1
bootNICv4
=
"enode://59ae768ecdee632e0daceccb6f71b215392eba89230d626573f2fb4e9c0786c9a661027ab7343820ca63d96fe48ffd81ed1bf6e4d512f0ba50ec072c9efd9e4e@[200.108.146.101]:30301"
bootnodes
=
"
${
bootNICv4
}
"
bootUNCv4
=
"enode://82b66b13d7addcf9ffe1e4e972a105f6ccf50557161c4a0978a5d9ce595ababde609ea8a49897ae89b1d41e90551cb2e9241363238593e950ca68bd5af7c24d6@[200.16.28.28]:30301"
bootnodes
=
"
${
bootUNCv4
}
,
${
bootNICv4
}
"
function
accountlist
{
...
...
@@ -55,9 +56,39 @@ then
echo
Consider running:
tail
-n
1000
-F
${
BFANODEDIR
}
/log
fi
# Start the node.
(
flock
--nonblock
--exclusive
9
||
exit
1
function
startbootnode
{
local
keyfile
=
${
BFANETWORKDIR
}
/bootnode/key
local
pidfile
=
${
BFANETWORKDIR
}
/bootnode/bootnode.pid
which bootnode
>
/dev/null 2>&1
||
return
test
-r
$keyfile
||
return
(
flock
--nonblock
--exclusive
9
||
(
echo
"A bootnode is already running."
false
)
||
exit
while
:
do
echo
echo
'***'
echo
bootnode
--nodekey
$keyfile
&
echo
$!
>
$pidfile
wait
sleep
60
done
2>&1 |
${
BFAHOME
}
/bin/log.sh
${
BFANETWORKDIR
}
/bootnode/log &
)
9>>
$pidfile
}
function
startgeth
{
# Start the node.
which geth
>
/dev/null 2>&1
||
return
(
flock
--nonblock
--exclusive
9
||
(
echo
"A geth is already running."
false
)
||
exit
1
echo
${
BASHPID
}
>
${
BFANODEDIR
}
/start-loop.pid
while
:
do
...
...
@@ -85,4 +116,8 @@ fi
wait
sleep
60
done
2>&1 |
${
BFAHOME
}
/bin/log.sh
${
BFANODEDIR
}
/log &
)
9>>
${
BFANODEDIR
}
/start-loop.pid
)
9>>
${
BFANODEDIR
}
/start-loop.pid
}
startgeth
startbootnode
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