diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2014-12-17 07:18:35 +0300 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2014-12-17 07:19:59 +0300 |
commit | a60254e665d3e92616db80eaa69a218030981d1f (patch) | |
tree | d87c03fcbe5cc97cd366c1d92d5340955be48762 /index.js | |
parent | d0436e41e72780d001048079bf265c08ecb1fd53 (diff) |
treat peer_id as hex everywhere
Fixes #203
Diffstat (limited to 'index.js')
-rw-r--r-- | index.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -51,7 +51,7 @@ function WebTorrent (opts) { self.peerId = opts.peerId === undefined ? new Buffer('-WW0001-' + hat(48), 'utf8') : typeof opts.peerId === 'string' - ? new Buffer(opts.peerId, 'utf8') + ? new Buffer(opts.peerId, 'hex') : opts.peerId self.peerIdHex = self.peerId.toString('hex') |