From e9a23893004c6a738f62ce969d4aeb488f72fdb7 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Thu, 13 Jul 2017 15:08:00 -0400 Subject: [PATCH] cmd: --consensus.no_empty_blocks --- cmd/tendermint/commands/run_node.go | 3 +++ config/config.go | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/tendermint/commands/run_node.go b/cmd/tendermint/commands/run_node.go index e99b8609..fce96edc 100644 --- a/cmd/tendermint/commands/run_node.go +++ b/cmd/tendermint/commands/run_node.go @@ -45,6 +45,9 @@ func AddNodeFlags(cmd *cobra.Command) { cmd.Flags().String("p2p.seeds", config.P2P.Seeds, "Comma delimited host:port seed nodes") cmd.Flags().Bool("p2p.skip_upnp", config.P2P.SkipUPNP, "Skip UPNP configuration") cmd.Flags().Bool("p2p.pex", config.P2P.PexReactor, "Enable Peer-Exchange (dev feature)") + + // consensus flags + cmd.Flags().Bool("consensus.no_empty_blocks", config.Consensus.NoEmptyBlocks, "Prevent empty blocks from being proposed by correct processes") } // Users wishing to: diff --git a/config/config.go b/config/config.go index a633b7fb..323b36a2 100644 --- a/config/config.go +++ b/config/config.go @@ -359,7 +359,7 @@ func DefaultConsensusConfig() *ConsensusConfig { SkipTimeoutCommit: false, MaxBlockSizeTxs: 10000, MaxBlockSizeBytes: 1, // TODO - NoEmptyBlocks: true, + NoEmptyBlocks: false, BlockPartSize: types.DefaultBlockPartSize, // TODO: we shouldnt be importing types PeerGossipSleepDuration: 100, PeerQueryMaj23SleepDuration: 2000, @@ -377,7 +377,6 @@ func TestConsensusConfig() *ConsensusConfig { config.TimeoutPrecommitDelta = 1 config.TimeoutCommit = 10 config.SkipTimeoutCommit = true - config.NoEmptyBlocks = false return config }