Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upStandardize hash variable names #374
Closed
Labels
Comments
This was referenced Nov 29, 2015
This comment has been minimized.
This comment has been minimized.
|
Please let me know if I missed anything. |
feross
added a commit
to webtorrent/parse-torrent-file
that referenced
this issue
Dec 2, 2015
feross
added a commit
to webtorrent/magnet-uri
that referenced
this issue
Dec 2, 2015
feross
added a commit
to webtorrent/torrent-discovery
that referenced
this issue
Dec 2, 2015
Replaces #8 For webtorrent/webtorrent#374
feross
added a commit
to webtorrent/bittorrent-protocol
that referenced
this issue
Dec 3, 2015
‘handshake’ event now emits infoHash and peerId as hex strings instead of Buffers. For webtorrent/webtorrent#374
feross
added a commit
that referenced
this issue
Dec 4, 2015
This comment has been minimized.
This comment has been minimized.
|
This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Right now, in most of the webtorrent modules, we use
self.infoHashto store a buffer andself.infoHashHexto store a hex string. But there are a few places likelib/torrent.jswhere it's actually a hex string.Same with
self.peerIdandself.peerIdHex.We've already standardized on using hex strings at the edges of the various modules, i.e. events that emit infoHashes or peerIds always use hex strings. Functions that take an hash input always accept a hex string OR a buffer.
Let's go hex strings all the way, and make it so the
self.infoHashproperty is always a hex string as well. And we can useself.infoHashBufferfor the buffer version. This will require changes to almost every module.