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
7abf968d
Unverified
Commit
7abf968d
authored
Oct 26, 2017
by
Péter Szilágyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/puppeth: skip genesis custom extra-data
parent
6eb38e02
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
12 deletions
+1
-12
wizard_genesis.go
cmd/puppeth/wizard_genesis.go
+0
-11
wizard_intro.go
cmd/puppeth/wizard_intro.go
+1
-1
No files found.
cmd/puppeth/wizard_genesis.go
View file @
7abf968d
...
...
@@ -118,22 +118,11 @@ func (w *wizard) makeGenesis() {
for
i
:=
int64
(
0
);
i
<
256
;
i
++
{
genesis
.
Alloc
[
common
.
BigToAddress
(
big
.
NewInt
(
i
))]
=
core
.
GenesisAccount
{
Balance
:
big
.
NewInt
(
1
)}
}
fmt
.
Println
()
// Query the user for some custom extras
fmt
.
Println
()
fmt
.
Println
(
"Specify your chain/network ID if you want an explicit one (default = random)"
)
genesis
.
Config
.
ChainId
=
new
(
big
.
Int
)
.
SetUint64
(
uint64
(
w
.
readDefaultInt
(
rand
.
Intn
(
65536
))))
fmt
.
Println
()
fmt
.
Println
(
"Anything fun to embed into the genesis block? (max 32 bytes)"
)
extra
:=
w
.
read
()
if
len
(
extra
)
>
32
{
extra
=
extra
[
:
32
]
}
genesis
.
ExtraData
=
append
([]
byte
(
extra
),
genesis
.
ExtraData
[
len
(
extra
)
:
]
...
)
// All done, store the genesis and flush to disk
w
.
conf
.
genesis
=
genesis
}
...
...
cmd/puppeth/wizard_intro.go
View file @
7abf968d
...
...
@@ -64,7 +64,7 @@ func (w *wizard) run() {
for
{
w
.
network
=
w
.
readString
()
if
!
strings
.
Contains
(
w
.
network
,
" "
)
{
fmt
.
Printf
(
"Sweet, you can set this via --network=%s next time!
\n\n
"
,
w
.
network
)
fmt
.
Printf
(
"
\n
Sweet, you can set this via --network=%s next time!
\n\n
"
,
w
.
network
)
break
}
log
.
Error
(
"I also like to live dangerously, still no spaces"
)
...
...
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