Skip to content

Commit

Permalink
change block time to 3s
Browse files Browse the repository at this point in the history
  • Loading branch information
beer-1 committed Nov 21, 2023
1 parent e382d93 commit cbe6c09
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions cmd/initiad/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,14 @@ func initAppConfig() (string, interface{}) {
func initTendermintConfig() *tmcfg.Config {
cfg := tmcfg.DefaultConfig()

// these values put a higher strain on node memory
// cfg.P2P.MaxNumInboundPeers = 100
// cfg.P2P.MaxNumOutboundPeers = 40
// block time from 5s to 3s
cfg.Consensus.TimeoutPropose = cfg.Consensus.TimeoutPropose * 3 / 5
cfg.Consensus.TimeoutProposeDelta = cfg.Consensus.TimeoutProposeDelta * 3 / 5
cfg.Consensus.TimeoutPrevote = cfg.Consensus.TimeoutPrevote * 3 / 5
cfg.Consensus.TimeoutPrevoteDelta = cfg.Consensus.TimeoutPrevoteDelta * 3 / 5
cfg.Consensus.TimeoutPrecommit = cfg.Consensus.TimeoutPrecommit * 3 / 5
cfg.Consensus.TimeoutPrecommitDelta = cfg.Consensus.TimeoutPrecommitDelta * 3 / 5
cfg.Consensus.TimeoutCommit = cfg.Consensus.TimeoutCommit * 3 / 5

return cfg
}

0 comments on commit cbe6c09

Please sign in to comment.