aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/discv5/ticket.go
diff options
context:
space:
mode:
Diffstat (limited to 'p2p/discv5/ticket.go')
-rw-r--r--p2p/discv5/ticket.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/p2p/discv5/ticket.go b/p2p/discv5/ticket.go
index 48dd114f0..193cef4be 100644
--- a/p2p/discv5/ticket.go
+++ b/p2p/discv5/ticket.go
@@ -398,12 +398,12 @@ func (s *ticketStore) nextRegisterableTicket() (t *ticketRef, wait time.Duration
//s.removeExcessTickets(topic)
if len(tickets.buckets) != 0 {
empty = false
- if list := tickets.buckets[bucket]; list != nil {
- for _, ref := range list {
- //debugLog(fmt.Sprintf(" nrt bucket = %d node = %x sn = %v wait = %v", bucket, ref.t.node.ID[:8], ref.t.serial, time.Duration(ref.topicRegTime()-now)))
- if nextTicket.t == nil || ref.topicRegTime() < nextTicket.topicRegTime() {
- nextTicket = ref
- }
+
+ list := tickets.buckets[bucket]
+ for _, ref := range list {
+ //debugLog(fmt.Sprintf(" nrt bucket = %d node = %x sn = %v wait = %v", bucket, ref.t.node.ID[:8], ref.t.serial, time.Duration(ref.topicRegTime()-now)))
+ if nextTicket.t == nil || ref.topicRegTime() < nextTicket.topicRegTime() {
+ nextTicket = ref
}
}
}