diff --git a/dht/bootstrap.go b/dht/bootstrap.go index f5bdd07..fde973a 100644 --- a/dht/bootstrap.go +++ b/dht/bootstrap.go @@ -7,7 +7,6 @@ import ( "time" "github.com/lbryio/reflector.go/dht/bits" - log "github.com/sirupsen/logrus" ) const ( diff --git a/dht/node.go b/dht/node.go index 0a5b5e2..c191b35 100644 --- a/dht/node.go +++ b/dht/node.go @@ -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. diff --git a/dht/routing_table.go b/dht/routing_table.go index ffc4eaf..d3d2818 100644 --- a/dht/routing_table.go +++ b/dht/routing_table.go @@ -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 diff --git a/dht/token_cache.go b/dht/token_cache.go index da50da6..7f772f8 100644 --- a/dht/token_cache.go +++ b/dht/token_cache.go @@ -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()]