diff --git a/config/config.go b/config/config.go index 3ccab645ed..fba0d44371 100644 --- a/config/config.go +++ b/config/config.go @@ -1073,7 +1073,7 @@ func DefaultConsensusConfig() *ConsensusConfig { WalPath: filepath.Join(defaultDataDir, "cs.wal", "wal"), CreateEmptyBlocks: true, CreateEmptyBlocksInterval: 0 * time.Second, - CreateProofBlockRange: 1, + CreateProofBlockRange: 0, PeerGossipSleepDuration: 100 * time.Millisecond, PeerQueryMaj23SleepDuration: 2000 * time.Millisecond, DoubleSignCheckHeight: int64(0), @@ -1137,8 +1137,8 @@ func (cfg *ConsensusConfig) ValidateBasic() error { if cfg.CreateEmptyBlocksInterval < 0 { return errors.New("create-empty-blocks-interval can't be negative") } - if cfg.CreateProofBlockRange < 1 { - return errors.New("create-proof-block-range must be greater or equal to 1") + if cfg.CreateProofBlockRange < 0 { + return errors.New("create-proof-block-range must be greater or equal to 0") } if cfg.PeerGossipSleepDuration < 0 { return errors.New("peer-gossip-sleep-duration can't be negative") diff --git a/internal/consensus/mempool_test.go b/internal/consensus/mempool_test.go index 93133c9a88..71be7c7a1b 100644 --- a/internal/consensus/mempool_test.go +++ b/internal/consensus/mempool_test.go @@ -35,7 +35,7 @@ func TestMempoolNoProgressUntilTxsAvailable(t *testing.T) { defer cancel() baseConfig := configSetup(t) - for proofBlockRange := int64(1); proofBlockRange <= 3; proofBlockRange++ { + for proofBlockRange := int64(0); proofBlockRange <= 3; proofBlockRange++ { t.Logf("Checking proof block range %d", proofBlockRange) config, err := ResetConfig(t.TempDir(), "consensus_mempool_txs_available_test") require.NoError(t, err)