-
Notifications
You must be signed in to change notification settings - Fork 2
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
Model for peer connections #61
Conversation
Note that I moved extractPeerInfo() down to near the bottom of peer.go (because it's not exported)
Message layer
…mulus into 31-create-connections
…ad/cumulus into 31-create-connections
…chpad/cumulus into 51-model-for-connections
func (ps *PeerStore) Addrs() []string { | ||
ps.lock.RLock() | ||
defer ps.lock.RUnlock() | ||
addrs := make([]string, len(ps.peers), len(ps.peers)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need the third argument cap
unless it's greater than second argument.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Irrelevant now that I switched the peerstore back to a map. Didn't know we could iterate over a map back then.... my bad.
peer/peer.go
Outdated
switch push.ResourceType { | ||
case message.ResourcePeerInfo: | ||
for _, addr := range push.Resource.([]string) { | ||
conn.Listen(addr, func(c net.Conn) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What the heck?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup this is one of those bugs I was telling you about..... just garbage.
No description provided.