Skip to content

Commit

Permalink
refactor: allow set 0 for 'create-proof-block-range' to ignore proof …
Browse files Browse the repository at this point in the history
…block app hash
  • Loading branch information
shotonoff committed Aug 31, 2022
1 parent 38dcdf3 commit b3dfc89
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit b3dfc89

Please sign in to comment.