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
ae6528d1
Commit
ae6528d1
authored
5 years ago
by
Robert Martin-Legene
Browse files
Options
Downloads
Patches
Plain Diff
Avoiding a loop
parent
bc9d328c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/generate-genesis-block.sh
+12
-7
12 additions, 7 deletions
bin/generate-genesis-block.sh
with
12 additions
and
7 deletions
bin/generate-genesis-block.sh
+
12
−
7
View file @
ae6528d1
#!/bin/bash
# Robert Martin-Legene <robert@nic.ar>
if
[
-z
"
${
BFAHOME
}
"
]
;
then
echo
"
\$
BFAHOME not set. Did you source bfa/bin/env ?"
>
&2
;
exit
1
;
fi
source
${
BFAHOME
}
/bin/libbfa.sh
||
exit
1
if
[
!
-d
"
${
BFANODEDIR
}
"
-o
!
-d
"
${
BFANODEDIR
}
/geth/chaindata"
]
# Don't let us call ourselves
if
[
-n
"
$LOOPCONTROL_GENESISCREATE
"
]
then
e
cho
"Node is not initialised. Initialising with genesis."
geth
--cache
0
--datadir
"
${
BFANODEDIR
}
"
--networkid
${
BFANETWORKID
}
init
"
${
BFANETWORKDIR
}
/genesis.json"
fi
e
xport
LOOPCONTROL_GENESISCREATE
=
1
if
[
-z
"
${
BFAHOME
}
"
]
;
then
echo
"
\$
BFAHOME not set. Did you source bfa/bin/env ?"
>
&2
;
exit
1
;
fi
source
${
BFAHOME
}
/bin/libbfa.sh
||
exit
1
if
[
!
-d
"
${
BFANODEDIR
}
"
-o
!
-d
"
${
BFANODEDIR
}
/geth/chaindata"
]
then
echo
"Node is not initialised. Initialising with genesis."
geth
--cache
0
--datadir
"
${
BFANODEDIR
}
"
--networkid
${
BFANETWORKID
}
init
"
${
BFANETWORKDIR
}
/genesis.json"
fi
fi
unset
LOOPCONTROL_GENESISCREATE
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