Skip to content

Commit

Permalink
Merge pull request #1399 from nicolae-leonte-go/feature/add_syncmode_…
Browse files Browse the repository at this point in the history
…checks_when_privacy_is_enabled

prevent quorum from starting if privacy is enabled and syncmode is not full
  • Loading branch information
Krish1979 committed May 26, 2022
2 parents c119733 + fd6299f commit 55c9816
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion cmd/geth/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,9 @@ func TestFlagsConfig(t *testing.T) {
// [Eth]
eth := cfg.Eth
assert.Equal(t, uint64(1), eth.NetworkId) // mainnet true
assert.Equal(t, downloader.FastSync, eth.SyncMode)
// Quorum - make full sync the default sync mode in quorum (as opposed to upstream geth)
assert.Equal(t, downloader.FullSync, eth.SyncMode)
// End Quorum
assert.Equal(t, []string{"enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net"}, eth.EthDiscoveryURLs)
assert.Equal(t, false, eth.NoPruning)
assert.Equal(t, false, eth.NoPrefetch)
Expand Down
3 changes: 3 additions & 0 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -2016,6 +2016,9 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
if cfg.QuorumLightClient.Enabled() && cfg.SyncMode != downloader.FullSync {
Fatalf("Only the 'full' syncmode is supported for the qlight client.")
}
if private.IsQuorumPrivacyEnabled() && cfg.SyncMode != downloader.FullSync {
Fatalf("Only the 'full' syncmode is supported when quorum privacy is enabled.")
}
// End Quorum

if ctx.GlobalIsSet(NetworkIdFlag.Name) {
Expand Down
4 changes: 3 additions & 1 deletion eth/ethconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ var LightClientGPO = gasprice.Config{

// Defaults contains default settings for use on the Ethereum main net.
var Defaults = Config{
SyncMode: downloader.FastSync,
// Quorum - make full sync the default sync mode in quorum (as opposed to upstream geth)
SyncMode: downloader.FullSync,
// End Quorum
Ethash: ethash.Config{
CacheDir: "ethash",
CachesInMem: 2,
Expand Down

0 comments on commit 55c9816

Please sign in to comment.