p2p: remove unused code (#20325)

This commit is contained in:
Felix Lange
2019-11-19 17:16:08 +01:00
committed by GitHub
parent ac5e28ea38
commit 9e8cc00b73
3 changed files with 1 additions and 23 deletions

View File

@ -40,17 +40,6 @@ func (h *expHeap) add(item string, exp time.Time) {
heap.Push(h, expItem{item, exp})
}
// remove removes an item.
func (h *expHeap) remove(item string) bool {
for i, v := range *h {
if v.item == item {
heap.Remove(h, i)
return true
}
}
return false
}
// contains checks whether an item is present.
func (h expHeap) contains(item string) bool {
for _, v := range h {