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

Method timerLoop

consensus/vbft/service.go:1633–1649  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1631}
1632
1633func (self *Server) timerLoop() {
1634 self.quitWg.Add(1)
1635 defer self.quitWg.Done()
1636
1637 for {
1638 select {
1639 case evt := <-self.timer.C:
1640 if err := self.processTimerEvent(evt); err != nil {
1641 log.Errorf("failed to process timer evt: %d, err: %s", evt.evtType, err)
1642 }
1643
1644 case <-self.quitC:
1645 log.Infof("server %d timerLoop quit", self.Index)
1646 return
1647 }
1648 }
1649}
1650
1651func (self *Server) processTimerEvent(evt *TimerEvent) error {
1652 switch evt.evtType {

Callers 1

initializeMethod · 0.95

Calls 4

processTimerEventMethod · 0.95
ErrorfFunction · 0.92
InfofFunction · 0.92
AddMethod · 0.80

Tested by

no test coverage detected