Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PeersOfChannel #15

Open
yfhk opened this issue Nov 21, 2018 · 0 comments
Open

PeersOfChannel #15

yfhk opened this issue Nov 21, 2018 · 0 comments

Comments

@yfhk
Copy link
Owner

yfhk commented Nov 21, 2018

// PeersOfChannel returns the NetworkMembers considered alive
// and also subscribed to the channel given
func (g *gossipServiceImpl) PeersOfChannel(channel common.ChainID) []discovery.NetworkMember {
gc := g.chanState.getGossipChannelByChainID(channel)
if gc == nil {
g.logger.Debug("No such channel", channel)
return nil
}

// for key, _ := range g.chanState.channels {
// 	g.logger.Debug("channel:", key)
// }
// debug.PrintStack()
// g.logger.Warningf("g.chanState:%v \t gc.GetPeers():%v\n",g.chanState, gc.GetPeers)
// gc1 := g.chanState.getGossipChannelByChainID(common.ChainID("tcoinchannel"))
// for i, peer := range gc1.GetPeers(){
// 	g.logger.Debugf("tcoin-------------------->index:%d, peer:%v\n", i, peer)
// }
return gc.GetPeers()

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant