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
18950591
Commit
18950591
authored
Oct 04, 2018
by
Felix Lange
Committed by
Péter Szilágyi
Oct 04, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
p2p: add enode URL to PeerInfo (#17838)
parent
12755325
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
peer.go
p2p/peer.go
+5
-3
No files found.
p2p/peer.go
View file @
18950591
...
...
@@ -425,9 +425,10 @@ func (rw *protoRW) ReadMsg() (Msg, error) {
// peer. Sub-protocol independent fields are contained and initialized here, with
// protocol specifics delegated to all connected sub-protocols.
type
PeerInfo
struct
{
ID
string
`json:"id"`
// Unique node identifier (also the encryption key)
Name
string
`json:"name"`
// Name of the node, including client type, version, OS, custom data
Caps
[]
string
`json:"caps"`
// Sum-protocols advertised by this particular peer
Enode
string
`json:"enode"`
// Node URL
ID
string
`json:"id"`
// Unique node identifier
Name
string
`json:"name"`
// Name of the node, including client type, version, OS, custom data
Caps
[]
string
`json:"caps"`
// Protocols advertised by this peer
Network
struct
{
LocalAddress
string
`json:"localAddress"`
// Local endpoint of the TCP data connection
RemoteAddress
string
`json:"remoteAddress"`
// Remote endpoint of the TCP data connection
...
...
@@ -447,6 +448,7 @@ func (p *Peer) Info() *PeerInfo {
}
// Assemble the generic peer metadata
info
:=
&
PeerInfo
{
Enode
:
p
.
Node
()
.
String
(),
ID
:
p
.
ID
()
.
String
(),
Name
:
p
.
Name
(),
Caps
:
caps
,
...
...
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