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
5e0eb62a
Unverified
Commit
5e0eb62a
authored
Aug 25, 2023
by
Péter Szilágyi
Committed by
GitHub
Aug 25, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eth/protocols/eth: stop advertising eth/66 for pathdb nodes (#28006)
parent
6dc9cdf1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
handler.go
eth/protocols/eth/handler.go
+9
-4
No files found.
eth/protocols/eth/handler.go
View file @
5e0eb62a
...
...
@@ -23,6 +23,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/p2p"
...
...
@@ -95,11 +96,15 @@ type TxPool interface {
// MakeProtocols constructs the P2P protocol definitions for `eth`.
func
MakeProtocols
(
backend
Backend
,
network
uint64
,
dnsdisc
enode
.
Iterator
)
[]
p2p
.
Protocol
{
protocols
:=
make
([]
p2p
.
Protocol
,
len
(
ProtocolVersions
))
for
i
,
version
:=
range
ProtocolVersions
{
protocols
:=
make
([]
p2p
.
Protocol
,
0
,
len
(
ProtocolVersions
))
for
_
,
version
:=
range
ProtocolVersions
{
version
:=
version
// Closure
protocols
[
i
]
=
p2p
.
Protocol
{
// Path scheme does not support GetNodeData, don't advertise eth66 on it
if
version
<=
ETH66
&&
backend
.
Chain
()
.
TrieDB
()
.
Scheme
()
==
rawdb
.
PathScheme
{
continue
}
protocols
=
append
(
protocols
,
p2p
.
Protocol
{
Name
:
ProtocolName
,
Version
:
version
,
Length
:
protocolLengths
[
version
],
...
...
@@ -119,7 +124,7 @@ func MakeProtocols(backend Backend, network uint64, dnsdisc enode.Iterator) []p2
},
Attributes
:
[]
enr
.
Entry
{
currentENREntry
(
backend
.
Chain
())},
DialCandidates
:
dnsdisc
,
}
}
)
}
return
protocols
}
...
...
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