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

Model for peer connections #61

Closed
wants to merge 39 commits into from
Closed

Conversation

jordanschalm
Copy link
Member

No description provided.

bfbachmann and others added 30 commits May 13, 2017 14:19
Note that I moved extractPeerInfo() down to near the bottom of peer.go (because it's not exported)
func (ps *PeerStore) Addrs() []string {
ps.lock.RLock()
defer ps.lock.RUnlock()
addrs := make([]string, len(ps.peers), len(ps.peers))
Copy link
Member Author

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.

Copy link
Member

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) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What the heck?

Copy link
Member

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.

@coveralls
Copy link

Coverage Status

Coverage decreased (-20.06%) to 66.317% when pulling b2bb416 on 51-model-for-connections into b120ac0 on dev.

@coveralls
Copy link

Coverage Status

Coverage decreased (-20.06%) to 66.317% when pulling b8d39cc on 51-model-for-connections into b120ac0 on dev.

@coveralls
Copy link

Coverage Status

Coverage decreased (-20.5%) to 65.857% when pulling b7bda32 on 51-model-for-connections into b120ac0 on dev.

@jordanschalm jordanschalm deleted the 51-model-for-connections branch June 17, 2017 23:54
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

Successfully merging this pull request may close these issues.

None yet

3 participants