MCPcopy
hub / github.com/canopy-network/canopy / emptyInbox

Method emptyInbox

controller/controller.go:412–418  ·  view source on GitHub ↗

emptyInbox() discards all unread messages for a specific topic

(topic lib.Topic)

Source from the content-addressed store, hash-verified

410
411// emptyInbox() discards all unread messages for a specific topic
412func (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
420const checkpointsFileName = "checkpoints.json"
421

Callers 1

pollMaxHeightMethod · 0.95

Calls 1

InboxMethod · 0.80

Tested by

no test coverage detected