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
6e7620af
Commit
6e7620af
authored
Jan 18, 2016
by
Bas van Kervel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eth: changed NodeInfo Genesis and Head types
parent
5945a333
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
handler.go
eth/handler.go
+6
-6
No files found.
eth/handler.go
View file @
6e7620af
...
...
@@ -750,10 +750,10 @@ func (self *ProtocolManager) txBroadcastLoop() {
// EthNodeInfo represents a short summary of the Ethereum sub-protocol metadata known
// about the host peer.
type
EthNodeInfo
struct
{
Network
int
`json:"network"`
// Ethereum network ID (0=Olympic, 1=Frontier, 2=Morden)
Difficulty
*
big
.
Int
`json:"difficulty"`
// Total difficulty of the host's blockchain
Genesis
string
`json:"genesis"`
// SHA3 hash of the host's genesis block
Head
string
`json:"head"`
// SHA3 hash of the host's best owned block
Network
int
`json:"network"`
// Ethereum network ID (0=Olympic, 1=Frontier, 2=Morden)
Difficulty
*
big
.
Int
`json:"difficulty"`
// Total difficulty of the host's blockchain
Genesis
common
.
Hash
`json:"genesis"`
// SHA3 hash of the host's genesis block
Head
common
.
Hash
`json:"head"`
// SHA3 hash of the host's best owned block
}
// NodeInfo retrieves some protocol metadata about the running host node.
...
...
@@ -761,7 +761,7 @@ func (self *ProtocolManager) NodeInfo() *EthNodeInfo {
return
&
EthNodeInfo
{
Network
:
self
.
networkId
,
Difficulty
:
self
.
blockchain
.
GetTd
(
self
.
blockchain
.
CurrentBlock
()
.
Hash
()),
Genesis
:
fmt
.
Sprintf
(
"%x"
,
self
.
blockchain
.
Genesis
()
.
Hash
()
),
Head
:
fmt
.
Sprintf
(
"%x"
,
self
.
blockchain
.
CurrentBlock
()
.
Hash
()
),
Genesis
:
self
.
blockchain
.
Genesis
()
.
Hash
(
),
Head
:
self
.
blockchain
.
CurrentBlock
()
.
Hash
(
),
}
}
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