disable diffsync when pipecommit is enabled (#820)

This commit is contained in:
zjubfd 2022-03-30 11:22:00 +08:00 committed by GitHub
parent cde35b0b36
commit 4598334a9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

@ -129,7 +129,7 @@ var (
}
PipeCommitFlag = cli.BoolFlag{
Name: "pipecommit",
Usage: "Enable MPT pipeline commit, it will improve syncing performance. It is an experimental feature(default is false)",
Usage: "Enable MPT pipeline commit, it will improve syncing performance. It is an experimental feature(default is false), diffsync will be disable if pipeline commit is enabled",
}
RangeLimitFlag = cli.BoolFlag{
Name: "rangelimit",

@ -200,7 +200,8 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
}
)
bcOps := make([]core.BlockChainOption, 0)
if config.DiffSync {
// TODO diffsync performance is not as expected, disable it when pipecommit is enabled for now
if config.DiffSync && !config.PipeCommit {
bcOps = append(bcOps, core.EnableLightProcessor)
}
if config.PipeCommit {