Skip to content

Commit

Permalink
Merge pull request #75 from lbryio/replace-v2
Browse files Browse the repository at this point in the history
V2 update
  • Loading branch information
nikooo777 authored Oct 25, 2019
2 parents 1155ea6 + aec378b commit ef1b10b
Show file tree
Hide file tree
Showing 46 changed files with 204 additions and 132 deletions.
2 changes: 1 addition & 1 deletion blobex/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"net"

"github.com/lbryio/lbry.go/extras/errors"
"github.com/lbryio/lbry.go/v2/extras/errors"

"golang.org/x/net/context"
"google.golang.org/grpc"
Expand Down
2 changes: 1 addition & 1 deletion dht/bits/bitmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strconv"
"strings"

"github.com/lbryio/lbry.go/extras/errors"
"github.com/lbryio/lbry.go/v2/extras/errors"

"github.com/lyoshenka/bencode"
)
Expand Down
2 changes: 1 addition & 1 deletion dht/bits/range.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package bits
import (
"math/big"

"github.com/lbryio/lbry.go/extras/errors"
"github.com/lbryio/lbry.go/v2/extras/errors"
)

// Range has a start and end
Expand Down
2 changes: 1 addition & 1 deletion dht/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"
"time"

"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/v2/dht/bits"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion dht/bootstrap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"net"
"testing"

"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/v2/dht/bits"
)

func TestBootstrapPing(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion dht/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"strconv"
"time"

"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/v2/dht/bits"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions dht/contact.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"sort"
"strconv"

"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/extras/errors"
"github.com/lbryio/lbry.go/v2/dht/bits"
"github.com/lbryio/lbry.go/v2/extras/errors"

"github.com/lyoshenka/bencode"
)
Expand Down
2 changes: 1 addition & 1 deletion dht/contact_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"reflect"
"testing"

"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/v2/dht/bits"
)

func TestCompactEncoding(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions dht/dht.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"strings"
"time"

"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/v2/dht/bits"
"github.com/lbryio/lbry.go/v2/extras/errors"
"github.com/lbryio/lbry.go/v2/extras/stop"

"github.com/sirupsen/logrus"
"github.com/spf13/cast"
Expand Down
4 changes: 2 additions & 2 deletions dht/dht_announce.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"sync"
"time"

"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/extras/errors"
"github.com/lbryio/lbry.go/v2/dht/bits"
"github.com/lbryio/lbry.go/v2/extras/errors"

"golang.org/x/time/rate"
)
Expand Down
2 changes: 1 addition & 1 deletion dht/dht_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/v2/dht/bits"
)

func TestNodeFinder_FindNodes(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions dht/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strconv"
"strings"

"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/extras/errors"
"github.com/lbryio/lbry.go/v2/dht/bits"
"github.com/lbryio/lbry.go/v2/extras/errors"

"github.com/lyoshenka/bencode"
"github.com/spf13/cast"
Expand Down
2 changes: 1 addition & 1 deletion dht/message_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"
"testing"

"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/v2/dht/bits"

"github.com/davecgh/go-spew/spew"
"github.com/lyoshenka/bencode"
Expand Down
8 changes: 4 additions & 4 deletions dht/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"sync"
"time"

"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/lbryio/lbry.go/v2/dht/bits"
"github.com/lbryio/lbry.go/v2/extras/errors"
"github.com/lbryio/lbry.go/v2/extras/stop"
"github.com/lbryio/lbry.go/v2/extras/util"

"github.com/davecgh/go-spew/spew"
"github.com/lyoshenka/bencode"
Expand Down
8 changes: 4 additions & 4 deletions dht/node_finder.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"sync"
"time"

"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/lbryio/lbry.go/v2/dht/bits"
"github.com/lbryio/lbry.go/v2/extras/crypto"
"github.com/lbryio/lbry.go/v2/extras/errors"
"github.com/lbryio/lbry.go/v2/extras/stop"

"github.com/sirupsen/logrus"
"github.com/uber-go/atomic"
Expand Down
2 changes: 1 addition & 1 deletion dht/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"
"time"

"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/v2/dht/bits"
"github.com/lyoshenka/bencode"
)

Expand Down
6 changes: 3 additions & 3 deletions dht/routing_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"sync"
"time"

"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/v2/dht/bits"
"github.com/lbryio/lbry.go/v2/extras/errors"
"github.com/lbryio/lbry.go/v2/extras/stop"
)

// TODO: if routing table is ever empty (aka the node is isolated), it should re-bootstrap
Expand Down
2 changes: 1 addition & 1 deletion dht/routing_table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"
"testing"

"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/v2/dht/bits"

"github.com/sebdah/goldie"
)
Expand Down
4 changes: 2 additions & 2 deletions dht/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strconv"
"sync"

"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/extras/errors"
"github.com/lbryio/lbry.go/v2/dht/bits"
"github.com/lbryio/lbry.go/v2/extras/errors"

"github.com/gorilla/mux"
rpc2 "github.com/gorilla/rpc/v2"
Expand Down
2 changes: 1 addition & 1 deletion dht/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package dht
import (
"sync"

"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/v2/dht/bits"
)

// TODO: expire stored data after tExpire time
Expand Down
4 changes: 2 additions & 2 deletions dht/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"testing"
"time"

"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/extras/errors"
"github.com/lbryio/lbry.go/v2/dht/bits"
"github.com/lbryio/lbry.go/v2/extras/errors"
)

var testingDHTIP = "127.0.0.1"
Expand Down
4 changes: 2 additions & 2 deletions dht/token_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"sync"
"time"

"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/extras/stop"
"github.com/lbryio/lbry.go/v2/dht/bits"
"github.com/lbryio/lbry.go/v2/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
Expand Down
4 changes: 2 additions & 2 deletions dht/token_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"sync"
"time"

"github.com/lbryio/lbry.go/dht/bits"
"github.com/lbryio/lbry.go/extras/stop"
"github.com/lbryio/lbry.go/v2/dht/bits"
"github.com/lbryio/lbry.go/v2/extras/stop"
)

type tokenManager struct {
Expand Down
6 changes: 3 additions & 3 deletions extras/api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"reflect"
"strings"

"github.com/lbryio/lbry.go/extras/errors"
"github.com/lbryio/lbry.go/extras/util"
"github.com/lbryio/lbry.go/extras/validator"
"github.com/lbryio/lbry.go/v2/extras/errors"
"github.com/lbryio/lbry.go/v2/extras/util"
"github.com/lbryio/lbry.go/v2/extras/validator"
v "github.com/lbryio/ozzo-validation"

"github.com/spf13/cast"
Expand Down
2 changes: 1 addition & 1 deletion extras/crypto/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"sort"
"strings"

"github.com/lbryio/lbry.go/extras/errors"
"github.com/lbryio/lbry.go/v2/extras/errors"

"github.com/btcsuite/btcutil/base58"
"golang.org/x/crypto/sha3"
Expand Down
2 changes: 1 addition & 1 deletion extras/jsonrpc/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"time"

"github.com/fatih/structs"
"github.com/lbryio/lbry.go/extras/errors"
"github.com/lbryio/lbry.go/v2/extras/errors"
"github.com/mitchellh/mapstructure"
"github.com/shopspring/decimal"
log "github.com/sirupsen/logrus"
Expand Down
6 changes: 3 additions & 3 deletions extras/jsonrpc/daemon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (

"github.com/shopspring/decimal"

"github.com/lbryio/lbry.go/extras/errors"
"github.com/lbryio/lbry.go/v2/extras/errors"

"github.com/lbryio/lbry.go/extras/util"
"github.com/lbryio/lbry.go/v2/extras/util"
)

func prettyPrint(i interface{}) {
Expand Down Expand Up @@ -640,7 +640,7 @@ func TestClient_WalletList(t *testing.T) {
if err == nil {
t.Fatalf("wallet %v was unexpectedly found", id)
}
if err.Error() != fmt.Sprintf("Error in daemon: Couldn't find wallet: %v.", id) {
if !strings.Contains(err.Error(), fmt.Sprintf("Couldn't find wallet: %v.", id)) {
t.Fatal(err)
}

Expand Down
4 changes: 2 additions & 2 deletions extras/jsonrpc/daemon_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"os"
"reflect"

"github.com/lbryio/lbry.go/extras/errors"
"github.com/lbryio/lbry.go/stream"
"github.com/lbryio/lbry.go/v2/extras/errors"
"github.com/lbryio/lbry.go/v2/stream"

schema "github.com/lbryio/lbryschema.go/claim"
lbryschema "github.com/lbryio/types/v2/go"
Expand Down
4 changes: 2 additions & 2 deletions extras/query/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"strings"
"time"

"github.com/lbryio/lbry.go/extras/errors"
"github.com/lbryio/lbry.go/extras/null"
"github.com/lbryio/lbry.go/v2/extras/errors"
"github.com/lbryio/lbry.go/v2/extras/null"
)

func InterpolateParams(query string, args ...interface{}) (string, error) {
Expand Down
2 changes: 1 addition & 1 deletion extras/travis/travis.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"encoding/pem"
"net/http"

"github.com/lbryio/lbry.go/extras/errors"
"github.com/lbryio/lbry.go/v2/extras/errors"
)

func publicKey(isPrivateRepo bool) (*rsa.PublicKey, error) {
Expand Down
2 changes: 1 addition & 1 deletion extras/util/pointer.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package util
import (
"time"

"github.com/lbryio/lbry.go/extras/null"
"github.com/lbryio/lbry.go/v2/extras/null"
)

func PtrToBool(b bool) *bool { return &b }
Expand Down
2 changes: 1 addition & 1 deletion extras/util/slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/lbryio/lbry.go/extras/errors"
"github.com/lbryio/lbry.go/v2/extras/errors"

"github.com/nlopes/slack"
log "github.com/sirupsen/logrus"
Expand Down
Loading

0 comments on commit ef1b10b

Please sign in to comment.