Stop() terminates the Controller service
()
| 164 | |
| 165 | // Stop() terminates the Controller service |
| 166 | func (c *Controller) Stop() { |
| 167 | // lock the controller |
| 168 | c.Lock() |
| 169 | // unlock when the function completes |
| 170 | defer c.Unlock() |
| 171 | // close the controller mempool store |
| 172 | c.Mempool.FSM.Discard() |
| 173 | // stop the store module |
| 174 | if err := c.FSM.Store().(lib.StoreI).Close(); err != nil { |
| 175 | c.log.Error(err.Error()) |
| 176 | } |
| 177 | // stop the p2p module |
| 178 | c.P2P.Stop() |
| 179 | } |
| 180 | |
| 181 | // ROOT CHAIN CALLS BELOW |
| 182 |