mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Revert "eth/protocols/eth: stop advertising eth/66 for pathdb nodes (#28006)"
This reverts commit 2fae17c8f6.
This commit is contained in:
parent
b7022ec6f7
commit
dac3cc9389
1 changed files with 4 additions and 9 deletions
|
|
@ -23,7 +23,6 @@ import (
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/ethereum/go-ethereum/core"
|
"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/core/types"
|
||||||
"github.com/ethereum/go-ethereum/metrics"
|
"github.com/ethereum/go-ethereum/metrics"
|
||||||
"github.com/ethereum/go-ethereum/p2p"
|
"github.com/ethereum/go-ethereum/p2p"
|
||||||
|
|
@ -96,15 +95,11 @@ type TxPool interface {
|
||||||
|
|
||||||
// MakeProtocols constructs the P2P protocol definitions for `eth`.
|
// MakeProtocols constructs the P2P protocol definitions for `eth`.
|
||||||
func MakeProtocols(backend Backend, network uint64, dnsdisc enode.Iterator) []p2p.Protocol {
|
func MakeProtocols(backend Backend, network uint64, dnsdisc enode.Iterator) []p2p.Protocol {
|
||||||
protocols := make([]p2p.Protocol, 0, len(ProtocolVersions))
|
protocols := make([]p2p.Protocol, len(ProtocolVersions))
|
||||||
for _, version := range ProtocolVersions {
|
for i, version := range ProtocolVersions {
|
||||||
version := version // Closure
|
version := version // Closure
|
||||||
|
|
||||||
// Path scheme does not support GetNodeData, don't advertise eth66 on it
|
protocols[i] = p2p.Protocol{
|
||||||
if version <= ETH66 && backend.Chain().TrieDB().Scheme() == rawdb.PathScheme {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
protocols = append(protocols, p2p.Protocol{
|
|
||||||
Name: ProtocolName,
|
Name: ProtocolName,
|
||||||
Version: version,
|
Version: version,
|
||||||
Length: protocolLengths[version],
|
Length: protocolLengths[version],
|
||||||
|
|
@ -124,7 +119,7 @@ func MakeProtocols(backend Backend, network uint64, dnsdisc enode.Iterator) []p2
|
||||||
},
|
},
|
||||||
Attributes: []enr.Entry{currentENREntry(backend.Chain())},
|
Attributes: []enr.Entry{currentENREntry(backend.Chain())},
|
||||||
DialCandidates: dnsdisc,
|
DialCandidates: dnsdisc,
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
return protocols
|
return protocols
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue