Skip to content

p2p/net: dial log -> events#676

Merged
jbenet merged 3 commits into
masterfrom
dial-events
Jan 28, 2015
Merged

p2p/net: dial log -> events#676
jbenet merged 3 commits into
masterfrom
dial-events

Conversation

@jbenet
Copy link
Copy Markdown
Member

@jbenet jbenet commented Jan 27, 2015

This commit turns all dial logs into log.Events.

Everything's great except for one problem: The LoggableMap I'm using does not
print out things correctly. I gave it peer.IDs, and Multiaddrs and both got
logged as nothing {} (didn't even call their String() methods!) So, for now,
this function encodes it when called... This is wrong and should be fixed
before being merged in. Otherwise we will be constantly encoding peer.IDs and
Multiaddrs without needing to.

@briantigerchow how do you suggest doing this? I don't know my way around your
Loggable things.

@jbenet jbenet added the status/in-progress In progress label Jan 27, 2015
@jbenet jbenet modified the milestone: α Jan 27, 2015
This commit turns all dial logs into log.Events.

Everything's great except for one problem:
The LoggableMap I'm using does not print out things
correctly. I gave it peer.IDs, and Multiaddrs
and both got logged as nothing `{}` (didn't even call
their String() methods!) So, for now, this function
encodes it when called... This is wrong and should be
fixed before being merged in. Otherwise we  will be
constantly encoding peer.IDs and Multiaddrs without
needing to.

@briantigerchow how do you suggest doing this?
I don't know my way around your Loggable.
@jbenet
Copy link
Copy Markdown
Member Author

jbenet commented Jan 27, 2015

Aaaaand this way of doing it causes races. so has to be done another way. This is basically what i want to do. @briantigerchow how should I do it right?

Comment thread p2p/net/conn/dial.go Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thought: rather than producing another event... Since d.PrivateKey == nil is known apriori, let insecure be included on the original event.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

👍 will do

jbenet added a commit that referenced this pull request Jan 28, 2015
p2p/net: dial log -> events
@jbenet jbenet merged commit 56b14d8 into master Jan 28, 2015
@jbenet jbenet removed the status/in-progress In progress label Jan 28, 2015
@jbenet jbenet deleted the dial-events branch January 28, 2015 10:25
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.

2 participants