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
5fcbaefd
Commit
5fcbaefd
authored
May 12, 2014
by
Maran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't forward localhost connections over the public network
parent
7f9fd087
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
peer.go
peer.go
+4
-1
No files found.
peer.go
View file @
5fcbaefd
...
@@ -534,8 +534,11 @@ func (p *Peer) peersMessage() *ethwire.Msg {
...
@@ -534,8 +534,11 @@ func (p *Peer) peersMessage() *ethwire.Msg {
outPeers
:=
make
([]
interface
{},
len
(
p
.
ethereum
.
InOutPeers
()))
outPeers
:=
make
([]
interface
{},
len
(
p
.
ethereum
.
InOutPeers
()))
// Serialise each peer
// Serialise each peer
for
i
,
peer
:=
range
p
.
ethereum
.
InOutPeers
()
{
for
i
,
peer
:=
range
p
.
ethereum
.
InOutPeers
()
{
// Don't return localhost as valid peer
if
!
net
.
ParseIP
(
peer
.
conn
.
RemoteAddr
()
.
String
())
.
IsLoopback
()
{
outPeers
[
i
]
=
peer
.
RlpData
()
outPeers
[
i
]
=
peer
.
RlpData
()
}
}
}
// Return the message to the peer with the known list of connected clients
// Return the message to the peer with the known list of connected clients
return
ethwire
.
NewMessage
(
ethwire
.
MsgPeersTy
,
outPeers
)
return
ethwire
.
NewMessage
(
ethwire
.
MsgPeersTy
,
outPeers
)
...
...
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