mirror of
https://github.com/PeernetOfficial/core.git
synced 2026-07-22 20:57:50 +01:00
Remove unnecessary ListIR. Removes complexity.
This commit is contained in:
@@ -12,7 +12,6 @@ import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"sort"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -24,10 +23,6 @@ type DHT struct {
|
||||
// The alpha amount of nodes will be contacted in parallel for finding the target.
|
||||
alpha int
|
||||
|
||||
// ListIR keeps track of all active information requests.
|
||||
ListIR map[string]*InformationRequest
|
||||
listIRmutex sync.RWMutex
|
||||
|
||||
// Functions below must be set and provided by the caller.
|
||||
|
||||
// ShouldEvict determines whether the given node shall be evicted
|
||||
@@ -52,7 +47,6 @@ func NewDHT(self *Node, bits, bucketSize, alpha int) *DHT {
|
||||
ht: newHashTable(self, bits, bucketSize),
|
||||
alpha: alpha,
|
||||
TMsgTimeout: 2 * time.Second,
|
||||
ListIR: make(map[string]*InformationRequest),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user