Skip to content

Commit

Permalink
FABG-943 Remove unused code (hyperledger#76)
Browse files Browse the repository at this point in the history
The caching of discovered peers in the network object was never used.  This commit removes that code.

Signed-off-by: andrew-coleman <[email protected]>
  • Loading branch information
andrew-coleman authored Jun 1, 2020
1 parent ad7b043 commit e937e5c
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions pkg/gateway/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ type Network struct {
name string
gateway *Gateway
client *channel.Client
peers []fab.Peer
event *event.Client
}

Expand All @@ -44,18 +43,6 @@ func newNetwork(gateway *Gateway, channelProvider context.ChannelProvider) (*Net

n.name = ctx.ChannelID()

discovery, err := ctx.ChannelService().Discovery()
if err != nil {
return nil, errors.Wrap(err, "Failed to create discovery service")
}

peers, err := discovery.GetPeers()
if err != nil {
return nil, errors.Wrap(err, "Failed to discover peers")
}

n.peers = peers

n.event, err = event.New(channelProvider, event.WithBlockEvents())
if err != nil {
return nil, errors.Wrap(err, "Failed to create new event client")
Expand Down

0 comments on commit e937e5c

Please sign in to comment.