good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
Erigon
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
a
Erigon
Commits
1ba7ffe9
Commit
1ba7ffe9
authored
11 years ago
by
obscuren
Browse files
Options
Downloads
Patches
Plain Diff
Added text for keys
parent
3fd57158
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ethereum.go
+13
-3
13 additions, 3 deletions
ethereum.go
with
13 additions
and
3 deletions
ethereum.go
+
13
−
3
View file @
1ba7ffe9
...
...
@@ -32,12 +32,22 @@ func RegisterInterupts(s *eth.Ethereum) {
func
CreateKeyPair
(
force
bool
)
{
data
,
_
:=
ethutil
.
Config
.
Db
.
Get
([]
byte
(
"KeyRing"
))
if
len
(
data
)
==
0
||
force
{
log
.
Println
(
"Generating new address and keypair"
)
pub
,
prv
:=
secp256k1
.
GenerateKeyPair
()
addr
:=
ethutil
.
Sha3Bin
(
pub
[
1
:
])[
12
:
]
log
.
Printf
(
"Your new address is %x
\n
"
,
addr
)
fmt
.
Printf
(
`
Generating new address and keypair.
Please keep your keys somewhere save.
Currently Ethereum(G) does not support
exporting keys.
++++++++++++++++ KeyRing +++++++++++++++++++
addr: %x
prvk: %x
pubk: %x
++++++++++++++++++++++++++++++++++++++++++++
`
,
addr
,
prv
,
pub
)
keyRing
:=
ethutil
.
NewValue
([]
interface
{}{
prv
,
addr
,
pub
[
1
:
]})
ethutil
.
Config
.
Db
.
Put
([]
byte
(
"KeyRing"
),
keyRing
.
Encode
())
...
...
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