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

Method cancelEventTimer

consensus/vbft/event_timer.go:218–225  ·  view source on GitHub ↗

internal helper, should call with lock held

(evtType TimerEventType, blockNum uint32)

Source from the content-addressed store, hash-verified

216// internal helper, should call with lock held
217//
218func (self *EventTimer) cancelEventTimer(evtType TimerEventType, blockNum uint32) {
219 timers := self.eventTimers[evtType]
220
221 if t, present := timers[blockNum]; present {
222 t.Stop()
223 delete(timers, blockNum)
224 }
225}
226
227func (self *EventTimer) StartProposalTimer(blockNum uint32) error {
228 self.lock.Lock()

Callers 11

CancelProposalTimerMethod · 0.95
CancelEndorseMsgTimerMethod · 0.95
CancelCommitMsgTimerMethod · 0.95
CancelBackoffTimerMethod · 0.95
onBlockSealedMethod · 0.95
CancelTxBlockTimeoutMethod · 0.95
stopTxTickerMethod · 0.95
TestCancelEventTimerFunction · 0.80

Calls 1

StopMethod · 0.65

Tested by 1

TestCancelEventTimerFunction · 0.64