mirror of
https://github.com/logos-storage/bittorrent-tracker.git
synced 2026-01-07 15:33:08 +00:00
remove buffer-equals dependency
This commit is contained in:
parent
35697f5187
commit
f60ecec0dc
@ -1,6 +1,5 @@
|
|||||||
module.exports = parseUdpRequest
|
module.exports = parseUdpRequest
|
||||||
|
|
||||||
var bufferEquals = require('buffer-equals')
|
|
||||||
var ipLib = require('ip')
|
var ipLib = require('ip')
|
||||||
var common = require('../common')
|
var common = require('../common')
|
||||||
|
|
||||||
@ -14,7 +13,7 @@ function parseUdpRequest (msg, rinfo) {
|
|||||||
type: 'udp'
|
type: 'udp'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!bufferEquals(params.connectionId, common.CONNECTION_ID)) {
|
if (!common.CONNECTION_ID.equals(params.connectionId)) {
|
||||||
throw new Error('received packet with invalid connection id')
|
throw new Error('received packet with invalid connection id')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bencode": "^0.8.0",
|
"bencode": "^0.8.0",
|
||||||
"bn.js": "^4.4.0",
|
"bn.js": "^4.4.0",
|
||||||
"buffer-equals": "^1.0.3",
|
|
||||||
"compact2string": "^1.2.0",
|
"compact2string": "^1.2.0",
|
||||||
"debug": "^2.0.0",
|
"debug": "^2.0.0",
|
||||||
"hat": "0.0.3",
|
"hat": "0.0.3",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user