mirror of
https://github.com/fluencelabs/tendermint
synced 2025-08-01 04:31:57 +00:00
fixes from review
This commit is contained in:
@@ -79,6 +79,8 @@ func GetConfig(rootDir string) cfg.Config {
|
|||||||
mapConfig.SetDefault("block_size", 10000) // max number of txs
|
mapConfig.SetDefault("block_size", 10000) // max number of txs
|
||||||
mapConfig.SetDefault("block_part_size", 65536) // part size 64K
|
mapConfig.SetDefault("block_part_size", 65536) // part size 64K
|
||||||
mapConfig.SetDefault("disable_data_hash", false)
|
mapConfig.SetDefault("disable_data_hash", false)
|
||||||
|
|
||||||
|
// all timeouts are in ms
|
||||||
mapConfig.SetDefault("timeout_handshake", 10000)
|
mapConfig.SetDefault("timeout_handshake", 10000)
|
||||||
mapConfig.SetDefault("timeout_propose", 3000)
|
mapConfig.SetDefault("timeout_propose", 3000)
|
||||||
mapConfig.SetDefault("timeout_propose_delta", 500)
|
mapConfig.SetDefault("timeout_propose_delta", 500)
|
||||||
@@ -87,6 +89,7 @@ func GetConfig(rootDir string) cfg.Config {
|
|||||||
mapConfig.SetDefault("timeout_precommit", 1000)
|
mapConfig.SetDefault("timeout_precommit", 1000)
|
||||||
mapConfig.SetDefault("timeout_precommit_delta", 500)
|
mapConfig.SetDefault("timeout_precommit_delta", 500)
|
||||||
mapConfig.SetDefault("timeout_commit", 1000)
|
mapConfig.SetDefault("timeout_commit", 1000)
|
||||||
|
|
||||||
// make progress asap (no `timeout_commit`) on full precommit votes
|
// make progress asap (no `timeout_commit`) on full precommit votes
|
||||||
mapConfig.SetDefault("skip_timeout_commit", false)
|
mapConfig.SetDefault("skip_timeout_commit", false)
|
||||||
mapConfig.SetDefault("mempool_recheck", true)
|
mapConfig.SetDefault("mempool_recheck", true)
|
||||||
|
@@ -326,7 +326,6 @@ func (h *Handshaker) replayBlocks(proxyApp proxy.AppConns, appBlockHeight, store
|
|||||||
func (h *Handshaker) replayLastBlock(proxyApp proxy.AppConnConsensus) ([]byte, error) {
|
func (h *Handshaker) replayLastBlock(proxyApp proxy.AppConnConsensus) ([]byte, error) {
|
||||||
mempool := types.MockMempool{}
|
mempool := types.MockMempool{}
|
||||||
cs := NewConsensusState(h.config, h.state, proxyApp, h.store, mempool)
|
cs := NewConsensusState(h.config, h.state, proxyApp, h.store, mempool)
|
||||||
defer cs.Stop()
|
|
||||||
|
|
||||||
evsw := types.NewEventSwitch()
|
evsw := types.NewEventSwitch()
|
||||||
evsw.Start()
|
evsw.Start()
|
||||||
@@ -338,6 +337,7 @@ func (h *Handshaker) replayLastBlock(proxyApp proxy.AppConnConsensus) ([]byte, e
|
|||||||
if _, err := cs.Start(); err != nil {
|
if _, err := cs.Start(); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
defer cs.Stop()
|
||||||
|
|
||||||
timeout := h.config.GetInt("timeout_handshake")
|
timeout := h.config.GetInt("timeout_handshake")
|
||||||
timer := time.NewTimer(time.Duration(timeout) * time.Millisecond)
|
timer := time.NewTimer(time.Duration(timeout) * time.Millisecond)
|
||||||
|
@@ -358,8 +358,9 @@ func (cs *ConsensusState) OnStart() error {
|
|||||||
// we may have lost some votes if the process crashed
|
// we may have lost some votes if the process crashed
|
||||||
// reload from consensus log to catchup
|
// reload from consensus log to catchup
|
||||||
if err := cs.catchupReplay(cs.Height); err != nil {
|
if err := cs.catchupReplay(cs.Height); err != nil {
|
||||||
log.Error("Error on catchup replay", "error", err.Error())
|
log.Error("Error on catchup replay. Proceeding to start ConsensusState anyway", "error", err.Error())
|
||||||
// let's go for it anyways, maybe we're fine
|
// NOTE: if we ever do return an error here,
|
||||||
|
// make sure to stop the timeoutTicker
|
||||||
}
|
}
|
||||||
|
|
||||||
// now start the receiveRoutine
|
// now start the receiveRoutine
|
||||||
|
Reference in New Issue
Block a user