Skip to content

Commit

Permalink
Consolidate abstractions and core types into go-libp2p-core (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
raulk committed May 25, 2019
1 parent 6793f6f commit 3ca427f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion p2p/net/pnet/protector.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"io"
"net"

ipnet "github.com/libp2p/go-libp2p-interface-pnet"
ipnet "github.com/libp2p/go-libp2p-core/pnet"
)

var _ ipnet.Protector = (*protector)(nil)
Expand Down
11 changes: 6 additions & 5 deletions p2p/net/pnet/psk_conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@ import (
"io"
"net"

salsa20 "github.com/davidlazar/go-crypto/salsa20"
"github.com/libp2p/go-libp2p-core/pnet"

"github.com/davidlazar/go-crypto/salsa20"
pool "github.com/libp2p/go-buffer-pool"
ipnet "github.com/libp2p/go-libp2p-interface-pnet"
)

// we are using buffer pool as user needs their slice back
// so we can't do XOR cripter in place
var (
errShortNonce = ipnet.NewError("could not read full nonce")
errInsecureNil = ipnet.NewError("insecure is nil")
errPSKNil = ipnet.NewError("pre-shread key is nil")
errShortNonce = pnet.NewError("could not read full nonce")
errInsecureNil = pnet.NewError("insecure is nil")
errPSKNil = pnet.NewError("pre-shread key is nil")
)

type pskConn struct {
Expand Down

0 comments on commit 3ca427f

Please sign in to comment.