update dht imports

This commit is contained in:
Alex Grintsvayg 2019-01-09 17:37:29 -05:00
parent bf61bd7b92
commit 30c3125016
21 changed files with 43 additions and 44 deletions

View file

@ -7,7 +7,7 @@ import (
"strconv"
"strings"
"github.com/lbryio/lbry.go/errors"
"github.com/lbryio/lbry.go/extras/errors"
"github.com/lyoshenka/bencode"
)

View file

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

View file

@ -4,7 +4,7 @@ import (
"net"
"testing"
"github.com/lbryio/reflector.go/dht/bits"
"github.com/lbryio/lbry.go/dht/bits"
)
func TestBootstrapPing(t *testing.T) {

View file

@ -4,13 +4,13 @@ import (
"strconv"
"time"
"github.com/lbryio/reflector.go/dht/bits"
peerproto "github.com/lbryio/reflector.go/peer"
"github.com/lbryio/lbry.go/dht/bits"
)
const (
Network = "udp4"
DefaultPort = 4444
Network = "udp4"
DefaultPort = 4444
DefaultPeerPort = 3333
DefaultAnnounceRate = 10 // send at most this many announces per second
DefaultReannounceTime = 50 * time.Minute // should be a bit less than hash expiration time
@ -69,7 +69,7 @@ func NewStandardConfig() *Config {
"lbrynet2.lbry.io:4444",
"lbrynet3.lbry.io:4444",
},
PeerProtocolPort: peerproto.DefaultPort,
PeerProtocolPort: DefaultPeerPort,
ReannounceTime: DefaultReannounceTime,
AnnounceRate: DefaultAnnounceRate,
}

View file

@ -6,8 +6,8 @@ import (
"sort"
"strconv"
"github.com/lbryio/lbry.go/errors"
"github.com/lbryio/reflector.go/dht/bits"
"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/extras/errors"
"github.com/lyoshenka/bencode"
)

View file

@ -5,7 +5,7 @@ import (
"reflect"
"testing"
"github.com/lbryio/reflector.go/dht/bits"
"github.com/lbryio/lbry.go/dht/bits"
)
func TestCompactEncoding(t *testing.T) {

View file

@ -6,10 +6,9 @@ import (
"strings"
"time"
"github.com/lbryio/reflector.go/dht/bits"
"github.com/lbryio/lbry.go/errors"
"github.com/lbryio/lbry.go/stop"
"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/extras/errors"
"github.com/lbryio/lbry.go/extras/stop"
"github.com/sirupsen/logrus"
"github.com/spf13/cast"

View file

@ -7,8 +7,8 @@ import (
"sync"
"time"
"github.com/lbryio/lbry.go/errors"
"github.com/lbryio/reflector.go/dht/bits"
"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/extras/errors"
"golang.org/x/time/rate"
)

View file

@ -6,7 +6,7 @@ import (
"testing"
"time"
"github.com/lbryio/reflector.go/dht/bits"
"github.com/lbryio/lbry.go/dht/bits"
)
func TestNodeFinder_FindNodes(t *testing.T) {

View file

@ -7,8 +7,8 @@ import (
"strconv"
"strings"
"github.com/lbryio/lbry.go/errors"
"github.com/lbryio/reflector.go/dht/bits"
"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/extras/errors"
"github.com/lyoshenka/bencode"
"github.com/spf13/cast"

View file

@ -8,8 +8,9 @@ import (
"strings"
"testing"
"github.com/lbryio/lbry.go/dht/bits"
"github.com/davecgh/go-spew/spew"
"github.com/lbryio/reflector.go/dht/bits"
"github.com/lyoshenka/bencode"
)

View file

@ -7,10 +7,10 @@ import (
"sync"
"time"
"github.com/lbryio/errors.go"
"github.com/lbryio/lbry.go/stop"
"github.com/lbryio/lbry.go/util"
"github.com/lbryio/reflector.go/dht/bits"
"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/extras/errors"
"github.com/lbryio/lbry.go/extras/stop"
"github.com/lbryio/lbry.go/extras/util"
"github.com/davecgh/go-spew/spew"
"github.com/lyoshenka/bencode"

View file

@ -4,10 +4,10 @@ import (
"sync"
"time"
"github.com/lbryio/lbry.go/crypto"
"github.com/lbryio/lbry.go/errors"
"github.com/lbryio/lbry.go/stop"
"github.com/lbryio/reflector.go/dht/bits"
"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/extras/crypto"
"github.com/lbryio/lbry.go/extras/errors"
"github.com/lbryio/lbry.go/extras/stop"
"github.com/sirupsen/logrus"
"github.com/uber-go/atomic"

View file

@ -5,7 +5,7 @@ import (
"testing"
"time"
"github.com/lbryio/reflector.go/dht/bits"
"github.com/lbryio/lbry.go/dht/bits"
"github.com/lyoshenka/bencode"
)

View file

@ -9,9 +9,9 @@ import (
"sync"
"time"
"github.com/lbryio/lbry.go/errors"
"github.com/lbryio/lbry.go/stop"
"github.com/lbryio/reflector.go/dht/bits"
"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/extras/errors"
"github.com/lbryio/lbry.go/extras/stop"
)
// TODO: if routing table is ever empty (aka the node is isolated), it should re-bootstrap

View file

@ -8,7 +8,7 @@ import (
"strings"
"testing"
"github.com/lbryio/reflector.go/dht/bits"
"github.com/lbryio/lbry.go/dht/bits"
"github.com/sebdah/goldie"
)

View file

@ -7,8 +7,8 @@ import (
"strconv"
"sync"
"github.com/lbryio/lbry.go/errors"
"github.com/lbryio/reflector.go/dht/bits"
"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/extras/errors"
"github.com/gorilla/mux"
rpc2 "github.com/gorilla/rpc/v2"

View file

@ -3,7 +3,7 @@ package dht
import (
"sync"
"github.com/lbryio/reflector.go/dht/bits"
"github.com/lbryio/lbry.go/dht/bits"
)
// TODO: expire stored data after tExpire time

View file

@ -7,8 +7,8 @@ import (
"testing"
"time"
"github.com/lbryio/lbry.go/errors"
"github.com/lbryio/reflector.go/dht/bits"
"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/extras/errors"
)
var testingDHTIP = "127.0.0.1"

View file

@ -4,9 +4,8 @@ import (
"sync"
"time"
"github.com/lbryio/reflector.go/dht/bits"
"github.com/lbryio/lbry.go/stop"
"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/extras/stop"
)
// TODO: this should be moved out of dht and into node, and it should be completely hidden inside node. dht should not need to know about tokens

View file

@ -9,8 +9,8 @@ import (
"sync"
"time"
"github.com/lbryio/lbry.go/stop"
"github.com/lbryio/reflector.go/dht/bits"
"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/extras/stop"
)
type tokenManager struct {