diff options
author | Felix Lange <fjl@twurst.com> | 2015-09-30 11:17:58 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2015-09-30 22:23:03 +0800 |
commit | 631bf361026676560b2995563fcf1324347a13a1 (patch) | |
tree | 696c27cdbbd14dfad01b552c636c0e1fbaa2c79a /p2p | |
parent | b4374436f331903ae1a19879aac0f37678b65f0e (diff) | |
download | go-tangerine-631bf361026676560b2995563fcf1324347a13a1.tar.gz go-tangerine-631bf361026676560b2995563fcf1324347a13a1.tar.zst go-tangerine-631bf361026676560b2995563fcf1324347a13a1.zip |
p2p/discover: remove unused lastLookup field
Diffstat (limited to 'p2p')
-rw-r--r-- | p2p/discover/table.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/p2p/discover/table.go b/p2p/discover/table.go index 66afa52ea..c128c2ed1 100644 --- a/p2p/discover/table.go +++ b/p2p/discover/table.go @@ -88,10 +88,7 @@ type transport interface { // bucket contains nodes, ordered by their last activity. the entry // that was most recently active is the first element in entries. -type bucket struct { - lastLookup time.Time - entries []*Node -} +type bucket struct{ entries []*Node } func newTable(t transport, ourID NodeID, ourAddr *net.UDPAddr, nodeDBPath string) *Table { // If no node database was given, use an in-memory one @@ -218,8 +215,6 @@ func (tab *Table) Lookup(targetID NodeID) []*Node { asked[tab.self.ID] = true tab.mutex.Lock() - // update last lookup stamp (for refresh logic) - tab.buckets[logdist(tab.self.sha, target)].lastLookup = time.Now() // generate initial result set result := tab.closest(target, bucketSize) tab.mutex.Unlock() |