code: func (t *topicTable) useTicket(node *Node, serialNo uint32, topics []Topic, idx int, issueTime uint64, waitPeriods []uint32) (registered bool) {
  	log.Trace("Using discovery ticket", "serial", serialNo, "topics", topics, "waits", waitPeriods)
  	//fmt.Println("useTicket", serialNo, topics, waitPeriods)
  	t.collectGarbage()
  
  	n := t.getOrNewNode(node)
  	if serialNo < n.lastUsedTicket {
  		return false
  	}
  
  	tm := mclock.Now()
  	if serialNo > n.lastUsedTicket && tm < n.noRegUntil {
  		return false
  	}
  	if serialNo != n.lastUsedTicket {
  		n.lastUsedTicket = serialNo
  		n.noRegUntil = tm + mclock.AbsTime(noRegTimeout())
  		t.storeTicketCounters(node)
  	}
  
  	currTime := uint64(tm / mclock.AbsTime(time.Second))
  	regTime := issueTime + uint64(waitPeriods[idx])
  	relTime := int64(currTime - regTime)
  	if relTime >= -1 && relTime <= regTimeWindow+1 { // give clients a little security margin on both ends
  		if e := n.entries[topics[idx]]; e == nil {
  			t.addEntry(node, topics[idx])
  		} else {
  			// if there is an active entry, don't move to the front of the FIFO but prolong expire time
  			e.expire = tm + mclock.AbsTime(fallbackRegistrationExpiry)
  		}
  		return true
  	}
  
  	return false
  }
docs: // It is assumed that topics and waitPeriods have the same length.