emptyInbox() discards all unread messages for a specific topic
(topic lib.Topic)
| 410 | |
| 411 | // emptyInbox() discards all unread messages for a specific topic |
| 412 | func (c *Controller) emptyInbox(topic lib.Topic) { |
| 413 | // for each message in the inbox |
| 414 | for len(c.P2P.Inbox(topic)) > 0 { |
| 415 | // discard the message |
| 416 | <-c.P2P.Inbox(topic) |
| 417 | } |
| 418 | } |
| 419 | |
| 420 | const checkpointsFileName = "checkpoints.json" |
| 421 |