()
| 619 | } |
| 620 | |
| 621 | func (ds *DbftService) start() { |
| 622 | log.Debug() |
| 623 | ds.started = true |
| 624 | |
| 625 | if config.DefConfig.Genesis.DBFT.GenBlockTime > config.MIN_GEN_BLOCK_TIME { |
| 626 | genesis.GenBlockTime = time.Duration(config.DefConfig.Genesis.DBFT.GenBlockTime) * time.Second |
| 627 | } else { |
| 628 | log.Warn("The Generate block time should be longer than 2 seconds, so set it to be default 6 seconds.") |
| 629 | } |
| 630 | |
| 631 | ds.sub.Subscribe(message.TOPIC_SAVE_BLOCK_COMPLETE) |
| 632 | |
| 633 | ds.InitializeConsensus(0) |
| 634 | } |
| 635 | |
| 636 | func (ds *DbftService) Timeout() { |
| 637 | if ds.timerHeight != ds.context.Height || ds.timeView != ds.context.ViewNumber { |
no test coverage detected