DefaultConsensusConfig returns a default configuration for the consensus service
()
| 957 | |
| 958 | // DefaultConsensusConfig returns a default configuration for the consensus service |
| 959 | func DefaultConsensusConfig() *ConsensusConfig { |
| 960 | return &ConsensusConfig{ |
| 961 | WalPath: filepath.Join(defaultDataDir, "cs.wal", "wal"), |
| 962 | TimeoutPropose: 5000 * time.Millisecond, |
| 963 | TimeoutProposeDelta: 1500 * time.Millisecond, |
| 964 | TimeoutPrevote: 2500 * time.Millisecond, |
| 965 | TimeoutPrevoteDelta: 1300 * time.Millisecond, |
| 966 | TimeoutPrecommit: 2500 * time.Millisecond, |
| 967 | TimeoutPrecommitDelta: 1300 * time.Millisecond, |
| 968 | TimeoutCommit: 2500 * time.Millisecond, |
| 969 | SkipTimeoutCommit: false, |
| 970 | CreateEmptyBlocks: true, |
| 971 | CreateEmptyBlocksInterval: 5 * time.Second, |
| 972 | PeerGossipSleepDuration: 1500 * time.Millisecond, |
| 973 | PeerQueryMaj23SleepDuration: 2500 * time.Millisecond, |
| 974 | DoubleSignCheckHeight: int64(0), |
| 975 | } |
| 976 | } |
| 977 | |
| 978 | // TestConsensusConfig returns a configuration for testing the consensus service |
| 979 | func TestConsensusConfig() *ConsensusConfig { |
no outgoing calls