internal helper, should call with lock held
(evtType TimerEventType, blockNum uint32)
| 216 | // internal helper, should call with lock held |
| 217 | // |
| 218 | func (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 | |
| 227 | func (self *EventTimer) StartProposalTimer(blockNum uint32) error { |
| 228 | self.lock.Lock() |