-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
basic ID cmd #255
basic ID cmd #255
Conversation
@whyrusleeping we get the version information on handshake1. We should be able to request resending the information on handshake1 and handshake3, and implement |
(or, when we connect to a peer, we store it in the peer.Peer object. So, if (we're not connected to them, we try connecting) we have it around in the peer.Peer object we print it. |
Needs some locking, and travis failed. rebase, and otherwise LGTM!! |
} else if p.privKey != nil { | ||
return p.privKey.GetPublic() | ||
} | ||
return nil |
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.
nono let's not do this because we dont want to have to compute it every time. We could move to this:
if p.pubKey == nil && p.privKey != nil {
p.pubKey = p.privKey.GetPublic()
}
return p.pubKey
but did you actually fall into this case?
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.
I dont know if ive seen it occur, but it feels like the common sense thing to do
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.
sure. switch it to mine, so we store the new value
|
Panic on simply testing it. Protocol changes like this will mean talking to nodes like mars, which don't currently have this change. Clients should not panic.
|
And: @maybebtc do you want new commands not to be added until #263 lands? |
Also,
|
btw, this cmd is really great! it makes the system much more tangible |
@jbenet |
@maybebtc ok this cmd will have to wait then, as it currently panics. ( |
Should I migrate this over to the new commands system? Or wait until the PR lands? |
the PR is pretty big, but it wouldn't really hurt. |
@whyrusleeping ok this one is finally unblocked! 👍 |
d200fa7
to
0de12b5
Compare
Alright, should be properly ported over to commands2 |
@whyrusleeping travis doesnt like you. Also, maybe add a sharness test? |
lol, travis failed because a bitswap test timed out, the stack trace shows over 500 goroutines spawned by that pubsub library we are using.. |
In that test there are 500 bitswap instances each waiting for 1 key. |
@whyrusleeping i merged this in and it doesn't work :/ need to specify arguments
|
Fixed in: 21d2838 |
Ah, i guess i didnt really understand how that part of the commands worked. |
fix tests on freebsd
The ID command I implemented here doesnt have all the information that @jbenet mentioned he would like to have in #228, I wasnt sure how to access the version information without using the config (we wont be able to get configs from remote peers)