MCPcopy Create free account
hub / github.com/DNAProject/DNA / start

Method start

consensus/dbft/dbft_service.go:621–634  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

619}
620
621func (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
636func (ds *DbftService) Timeout() {
637 if ds.timerHeight != ds.context.Height || ds.timeView != ds.context.ViewNumber {

Callers 1

ReceiveMethod · 0.95

Calls 4

InitializeConsensusMethod · 0.95
DebugFunction · 0.92
WarnFunction · 0.92
SubscribeMethod · 0.45

Tested by

no test coverage detected