feature: remove diff protocol registration (#1486)

This commit is contained in:
Larry 2023-04-19 15:34:33 +08:00 committed by GitHub
parent bbd4e9252f
commit cbbe7de6d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 7 deletions

@ -141,8 +141,7 @@ var (
DiffSyncFlag = cli.BoolFlag{
Name: "diffsync",
Usage: "Enable diffy sync, Please note that enable diffsync will improve the syncing speed, " +
"but will degrade the security to light client level",
Usage: "warn: diff sync has been deprecated, the flag will be removed in the future",
}
PipeCommitFlag = cli.BoolFlag{
Name: "pipecommit",

@ -45,7 +45,6 @@ import (
"github.com/ethereum/go-ethereum/eth/filters"
"github.com/ethereum/go-ethereum/eth/gasprice"
"github.com/ethereum/go-ethereum/eth/protocols/bsc"
"github.com/ethereum/go-ethereum/eth/protocols/diff"
"github.com/ethereum/go-ethereum/eth/protocols/eth"
"github.com/ethereum/go-ethereum/eth/protocols/snap"
"github.com/ethereum/go-ethereum/eth/protocols/trust"
@ -619,9 +618,9 @@ func (s *Ethereum) Protocols() []p2p.Protocol {
protos = append(protos, snap.MakeProtocols((*snapHandler)(s.handler), s.snapDialCandidates)...)
}
// diff protocol can still open without snap protocol
if !s.config.DisableDiffProtocol {
protos = append(protos, diff.MakeProtocols((*diffHandler)(s.handler), s.snapDialCandidates)...)
}
// if !s.config.DisableDiffProtocol {
// protos = append(protos, diff.MakeProtocols((*diffHandler)(s.handler), s.snapDialCandidates)...)
// }
if s.config.EnableTrustProtocol {
protos = append(protos, trust.MakeProtocols((*trustHandler)(s.handler), s.snapDialCandidates)...)
}