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
c833c3fe
Commit
c833c3fe
authored
Jul 03, 2014
by
zelig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add ClientIdentity() ethwire.ClientIdentity to Ethereum
parent
c6462996
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
9 deletions
+16
-9
ethereum.go
ethereum.go
+16
-9
No files found.
ethereum.go
View file @
c833c3fe
...
...
@@ -76,9 +76,11 @@ type Ethereum struct {
RpcServer
*
ethrpc
.
JsonRpcServer
keyManager
*
ethcrypto
.
KeyManager
clientIdentity
ethwire
.
ClientIdentity
}
func
New
(
db
ethutil
.
Database
,
keyManager
*
ethcrypto
.
KeyManager
,
caps
Caps
,
usePnp
bool
)
(
*
Ethereum
,
error
)
{
func
New
(
db
ethutil
.
Database
,
clientIdentity
ethwire
.
ClientIdentity
,
keyManager
*
ethcrypto
.
KeyManager
,
caps
Caps
,
usePnp
bool
)
(
*
Ethereum
,
error
)
{
var
err
error
var
nat
NAT
...
...
@@ -94,14 +96,15 @@ func New(db ethutil.Database, keyManager *ethcrypto.KeyManager, caps Caps, usePn
nonce
,
_
:=
ethutil
.
RandomUint64
()
ethereum
:=
&
Ethereum
{
shutdownChan
:
make
(
chan
bool
),
quit
:
make
(
chan
bool
),
db
:
db
,
peers
:
list
.
New
(),
Nonce
:
nonce
,
serverCaps
:
caps
,
nat
:
nat
,
keyManager
:
keyManager
,
shutdownChan
:
make
(
chan
bool
),
quit
:
make
(
chan
bool
),
db
:
db
,
peers
:
list
.
New
(),
Nonce
:
nonce
,
serverCaps
:
caps
,
nat
:
nat
,
keyManager
:
keyManager
,
clientIdentity
:
clientIdentity
,
}
ethereum
.
reactor
=
ethutil
.
NewReactorEngine
()
...
...
@@ -123,6 +126,10 @@ func (s *Ethereum) KeyManager() *ethcrypto.KeyManager {
return
s
.
keyManager
}
func
(
s
*
Ethereum
)
ClientIdentity
()
ethwire
.
ClientIdentity
{
return
s
.
clientIdentity
}
func
(
s
*
Ethereum
)
BlockChain
()
*
ethchain
.
BlockChain
{
return
s
.
blockChain
}
...
...
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