Skip to content

Commit

Permalink
update libp2p again
Browse files Browse the repository at this point in the history
  • Loading branch information
Stebalien committed Aug 19, 2020
1 parent d7f609c commit d936acb
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 114 deletions.
12 changes: 2 additions & 10 deletions daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (

multierror "github.com/hashicorp/go-multierror"
logging "github.com/ipfs/go-log"
autonat "github.com/libp2p/go-libp2p-autonat-svc"
dht "github.com/libp2p/go-libp2p-kad-dht"
dhtopts "github.com/libp2p/go-libp2p-kad-dht/opts"
ps "github.com/libp2p/go-libp2p-pubsub"
Expand All @@ -32,9 +31,8 @@ type Daemon struct {
host host.Host
listener manet.Listener

dht *dht.IpfsDHT
pubsub *ps.PubSub
autonat *autonat.AutoNATService
dht *dht.IpfsDHT
pubsub *ps.PubSub

mx sync.Mutex
// stream handlers: map of protocol.ID to multi-address
Expand Down Expand Up @@ -126,12 +124,6 @@ func (d *Daemon) EnablePubsub(router string, sign, strict bool) error {

}

func (d *Daemon) EnableAutoNAT(opts ...libp2p.Option) error {
svc, err := autonat.NewAutoNATService(d.ctx, d.host, opts...)
d.autonat = svc
return err
}

func (d *Daemon) ID() peer.ID {
return d.host.ID()
}
Expand Down
40 changes: 15 additions & 25 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,28 @@ module github.com/libp2p/go-libp2p-daemon
go 1.12

require (
github.com/benbjohnson/clock v1.0.2 // indirect
github.com/gogo/protobuf v1.3.1
github.com/golang/protobuf v1.4.2 // indirect
github.com/hashicorp/go-multierror v1.1.0
github.com/ipfs/go-cid v0.0.6
github.com/ipfs/go-cid v0.0.7
github.com/ipfs/go-log v1.0.4
github.com/ipfs/go-log/v2 v2.1.1 // indirect
github.com/libp2p/go-libp2p v0.9.2
github.com/libp2p/go-libp2p-autonat-svc v0.1.0
github.com/libp2p/go-libp2p-circuit v0.2.3
github.com/libp2p/go-libp2p-connmgr v0.2.3
github.com/libp2p/go-libp2p-core v0.5.6
github.com/libp2p/go-libp2p-kad-dht v0.8.1
github.com/libp2p/go-libp2p-kbucket v0.4.2 // indirect
github.com/libp2p/go-libp2p v0.10.3
github.com/libp2p/go-libp2p-circuit v0.3.1
github.com/libp2p/go-libp2p-connmgr v0.2.4
github.com/libp2p/go-libp2p-core v0.6.1
github.com/libp2p/go-libp2p-kad-dht v0.8.3
github.com/libp2p/go-libp2p-noise v0.1.1
github.com/libp2p/go-libp2p-peerstore v0.2.4
github.com/libp2p/go-libp2p-pubsub v0.3.1
github.com/libp2p/go-libp2p-quic-transport v0.5.0
github.com/libp2p/go-libp2p-record v0.1.3 // indirect
github.com/libp2p/go-libp2p-peerstore v0.2.6
github.com/libp2p/go-libp2p-pubsub v0.3.4
github.com/libp2p/go-libp2p-quic-transport v0.7.1
github.com/libp2p/go-libp2p-secio v0.2.2
github.com/libp2p/go-libp2p-swarm v0.2.5 // indirect
github.com/libp2p/go-libp2p-tls v0.1.3
github.com/libp2p/go-libp2p-yamux v0.2.8 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/multiformats/go-multiaddr v0.2.2
github.com/multiformats/go-multiaddr-net v0.1.5
github.com/multiformats/go-multihash v0.0.13
github.com/prometheus/client_golang v1.6.0
github.com/prometheus/common v0.10.0 // indirect
github.com/stretchr/testify v1.6.0
github.com/multiformats/go-multiaddr v0.3.0
github.com/multiformats/go-multiaddr-net v0.2.0
github.com/multiformats/go-multihash v0.0.14
github.com/prometheus/client_golang v1.7.1
github.com/stretchr/testify v1.6.1
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37 // indirect
golang.org/x/net v0.0.0-20200602114024-627f9648deb9 // indirect
golang.org/x/sys v0.0.0-20200602100848-8d3cce7afc34 // indirect
google.golang.org/protobuf v1.24.0 // indirect
gopkg.in/yaml.v2 v2.3.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20200602154603-c1a7af8cc6cd // indirect
Expand Down
Loading

0 comments on commit d936acb

Please sign in to comment.