-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Need to set peer ID to start with "-WD-" #688
Comments
I'm very new to node, but I assuming you want the client.peerId to be a string and the client.peerIdBuffer to be a Buffer, right? I think I've basically fixed this, but just want to make sure I'm understanding correctly. |
The format that I have created is -WD0018-bc9d8c89a36d for example. I'm not sure why I'm getting 0018 when the semver is 0.8.1. It seems it should be -WD0008-bc9d8c89a36d, but I'm just copying the code from webtorrent repo. It has something to do with this regex being incorrect. var VERSION_STR = VERSION.match(/([0-9]+)/g).slice(0, 2).map(zeroFill(2)).join('') |
@rjmille2 I opened a PR for fixing the version string webtorrent/webtorrent#851. I only think you need to pass the |
@mathiasvr, thanks for letting me know. I didn't realize that you could do lambda operations like that in node. I looked at your PR and learned something new today! |
@rjmille2 I assume that you got busy -- I'll send a PR to implement this today. |
PR: #742 |
Continuation of this PR: #462
Need to set the Peer ID using logic that's just like that in webtorrent here: https://github.com/feross/webtorrent/blob/46b3655927eefb4a18fbbfd547013863ccdaed4b/index.js#L23-L65
The text was updated successfully, but these errors were encountered: