End is an operation that does a graceful shutdown
()
| 121 | |
| 122 | //End is an operation that does a graceful shutdown |
| 123 | func (d *DosNode) End() { |
| 124 | d.m.Lock() |
| 125 | defer d.m.Unlock() |
| 126 | select { |
| 127 | case <-d.ctx.Done(): |
| 128 | default: |
| 129 | d.chain.UnRegisterNode() |
| 130 | d.p.Leave() |
| 131 | d.cancel() |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | func (d *DosNode) Start() { |
| 136 | d.logger.Event("peersUpdate", map[string]interface{}{"numOfPeers": 0}) |
no test coverage detected