This commit is contained in:
Alex Grintsvayg 2018-06-26 10:58:19 -04:00
parent 4e78c08818
commit 6fefcc4530
4 changed files with 2 additions and 4 deletions

View file

@ -7,7 +7,6 @@ import (
"time"
"github.com/lbryio/reflector.go/dht/bits"
log "github.com/sirupsen/logrus"
)
const (

View file

@ -14,7 +14,6 @@ import (
"github.com/davecgh/go-spew/spew"
"github.com/lyoshenka/bencode"
log "github.com/sirupsen/logrus"
)
// packet represents the information receive from udp.

View file

@ -13,8 +13,6 @@ import (
"github.com/lbryio/lbry.go/errors"
"github.com/lbryio/lbry.go/stop"
"github.com/lbryio/reflector.go/dht/bits"
log "github.com/sirupsen/logrus"
)
// TODO: if routing table is ever empty (aka the node is isolated), it should re-bootstrap

View file

@ -32,6 +32,8 @@ func newTokenCache(node *Node, expiration time.Duration) *tokenCache {
return tc
}
// TODO: if store fails, get new token. can happen if a node restarts but we have the token cached
func (tc *tokenCache) Get(c Contact, hash bits.Bitmap, cancelCh stop.Chan) string {
tc.lock.RLock()
token, exists := tc.tokens[c.String()]