Skip to content

Commit

Permalink
feature: remove diff protocol registration (#1486)
Browse files Browse the repository at this point in the history
  • Loading branch information
brilliant-lx authored Apr 19, 2023
1 parent bbd4e92 commit cbbe7de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 2 additions & 3 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,8 @@ 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",
Name: "diffsync",
Usage: "warn: diff sync has been deprecated, the flag will be removed in the future",
}
PipeCommitFlag = cli.BoolFlag{
Name: "pipecommit",
Expand Down
7 changes: 3 additions & 4 deletions eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)...)
}
Expand Down

0 comments on commit cbbe7de

Please sign in to comment.