Skip to content

Commit

Permalink
remove peer connectedness watchers from hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Feb 5, 2023
1 parent 7119beb commit b66075a
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 246 deletions.
5 changes: 0 additions & 5 deletions p2p/host/basic/basic_host.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,6 @@ func NewHost(n network.Network, opts *HostOpts) (*BasicHost, error) {
if h.emitters.evtLocalAddrsUpdated, err = h.eventbus.Emitter(&event.EvtLocalAddressesUpdated{}, eventbus.Stateful); err != nil {
return nil, err
}
evtPeerConnectednessChanged, err := h.eventbus.Emitter(&event.EvtPeerConnectednessChanged{})
if err != nil {
return nil, err
}
h.Network().Notify(newPeerConnectWatcher(evtPeerConnectednessChanged))

if !h.disableSignedPeerRecord {
cab, ok := peerstore.GetCertifiedAddrBook(n.Peerstore())
Expand Down
71 changes: 0 additions & 71 deletions p2p/host/basic/peer_connectedness.go

This file was deleted.

48 changes: 0 additions & 48 deletions p2p/host/basic/peer_connectedness_test.go

This file was deleted.

5 changes: 0 additions & 5 deletions p2p/host/blank/blank.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@ func NewBlankHost(n network.Network, options ...Option) *BlankHost {
if bh.emitters.evtLocalProtocolsUpdated, err = bh.eventbus.Emitter(&event.EvtLocalProtocolsUpdated{}); err != nil {
return nil
}
evtPeerConnectednessChanged, err := bh.eventbus.Emitter(&event.EvtPeerConnectednessChanged{})
if err != nil {
return nil
}
n.Notify(newPeerConnectWatcher(evtPeerConnectednessChanged))

n.SetStreamHandler(bh.newStreamHandler)

Expand Down
71 changes: 0 additions & 71 deletions p2p/host/blank/peer_connectedness.go

This file was deleted.

46 changes: 0 additions & 46 deletions p2p/host/blank/peer_connectedness_test.go

This file was deleted.

0 comments on commit b66075a

Please sign in to comment.