Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
f90a193f
Unverified
Commit
f90a193f
authored
Sep 05, 2017
by
Péter Szilágyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/puppeth: switch node containers to main ones
parent
8e14bb14
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
module_node.go
cmd/puppeth/module_node.go
+4
-4
No files found.
cmd/puppeth/module_node.go
View file @
f90a193f
...
@@ -30,7 +30,7 @@ import (
...
@@ -30,7 +30,7 @@ import (
// nodeDockerfile is the Dockerfile required to run an Ethereum node.
// nodeDockerfile is the Dockerfile required to run an Ethereum node.
var
nodeDockerfile
=
`
var
nodeDockerfile
=
`
FROM ethereum/client-go:
alpine-develop
FROM ethereum/client-go:
latest
ADD genesis.json /genesis.json
ADD genesis.json /genesis.json
{{if .Unlock}}
{{if .Unlock}}
...
@@ -38,9 +38,9 @@ ADD genesis.json /genesis.json
...
@@ -38,9 +38,9 @@ ADD genesis.json /genesis.json
ADD signer.pass /signer.pass
ADD signer.pass /signer.pass
{{end}}
{{end}}
RUN \
RUN \
echo '
/
geth init /genesis.json' > geth.sh && \{{if .Unlock}}
echo 'geth init /genesis.json' > geth.sh && \{{if .Unlock}}
echo 'mkdir -p /root/.ethereum/keystore/ && cp /signer.json /root/.ethereum/keystore/' >> geth.sh && \{{end}}
echo 'mkdir -p /root/.ethereum/keystore/ && cp /signer.json /root/.ethereum/keystore/' >> geth.sh && \{{end}}
echo $'
/
geth --networkid {{.NetworkID}} --cache 512 --port {{.Port}} --maxpeers {{.Peers}} {{.LightFlag}} --ethstats \'{{.Ethstats}}\' {{if .BootV4}}--bootnodesv4 {{.BootV4}}{{end}} {{if .BootV5}}--bootnodesv5 {{.BootV5}}{{end}} {{if .Etherbase}}--etherbase {{.Etherbase}} --mine{{end}}{{if .Unlock}}--unlock 0 --password /signer.pass --mine{{end}} --targetgaslimit {{.GasTarget}} --gasprice {{.GasPrice}}' >> geth.sh
echo $'geth --networkid {{.NetworkID}} --cache 512 --port {{.Port}} --maxpeers {{.Peers}} {{.LightFlag}} --ethstats \'{{.Ethstats}}\' {{if .BootV4}}--bootnodesv4 {{.BootV4}}{{end}} {{if .BootV5}}--bootnodesv5 {{.BootV5}}{{end}} {{if .Etherbase}}--etherbase {{.Etherbase}} --mine{{end}}{{if .Unlock}}--unlock 0 --password /signer.pass --mine{{end}} --targetgaslimit {{.GasTarget}} --gasprice {{.GasPrice}}' >> geth.sh
ENTRYPOINT ["/bin/sh", "geth.sh"]
ENTRYPOINT ["/bin/sh", "geth.sh"]
`
`
...
@@ -197,7 +197,7 @@ func checkNode(client *sshClient, network string, boot bool) (*nodeInfos, error)
...
@@ -197,7 +197,7 @@ func checkNode(client *sshClient, network string, boot bool) (*nodeInfos, error)
// Container available, retrieve its node ID and its genesis json
// Container available, retrieve its node ID and its genesis json
var
out
[]
byte
var
out
[]
byte
if
out
,
err
=
client
.
Run
(
fmt
.
Sprintf
(
"docker exec %s_%s_1
/
geth --exec admin.nodeInfo.id attach"
,
network
,
kind
));
err
!=
nil
{
if
out
,
err
=
client
.
Run
(
fmt
.
Sprintf
(
"docker exec %s_%s_1 geth --exec admin.nodeInfo.id attach"
,
network
,
kind
));
err
!=
nil
{
return
nil
,
ErrServiceUnreachable
return
nil
,
ErrServiceUnreachable
}
}
id
:=
bytes
.
Trim
(
bytes
.
TrimSpace
(
out
),
"
\"
"
)
id
:=
bytes
.
Trim
(
bytes
.
TrimSpace
(
out
),
"
\"
"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment