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
4c23fe97
Unverified
Commit
4c23fe97
authored
Mar 06, 2023
by
Péter Szilágyi
Committed by
GitHub
Mar 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eth: remove admin.peers[i].eth.head and difficulty (#26804)
parent
d865a5d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
10 deletions
+2
-10
peer.go
eth/peer.go
+2
-10
No files found.
eth/peer.go
View file @
4c23fe97
...
...
@@ -17,8 +17,6 @@
package
eth
import
(
"math/big"
"github.com/ethereum/go-ethereum/eth/protocols/eth"
"github.com/ethereum/go-ethereum/eth/protocols/snap"
)
...
...
@@ -26,9 +24,7 @@ import (
// ethPeerInfo represents a short summary of the `eth` sub-protocol metadata known
// about a connected peer.
type
ethPeerInfo
struct
{
Version
uint
`json:"version"`
// Ethereum protocol version negotiated
Difficulty
*
big
.
Int
`json:"difficulty"`
// Total difficulty of the peer's blockchain
Head
string
`json:"head"`
// Hex hash of the peer's best owned block
Version
uint
`json:"version"`
// Ethereum protocol version negotiated
}
// ethPeer is a wrapper around eth.Peer to maintain a few extra metadata.
...
...
@@ -39,12 +35,8 @@ type ethPeer struct {
// info gathers and returns some `eth` protocol metadata known about a peer.
func
(
p
*
ethPeer
)
info
()
*
ethPeerInfo
{
hash
,
td
:=
p
.
Head
()
return
&
ethPeerInfo
{
Version
:
p
.
Version
(),
Difficulty
:
td
,
Head
:
hash
.
Hex
(),
Version
:
p
.
Version
(),
}
}
...
...
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