Skip to content

Commit bbe2fa3

Browse files
committed
upgrade bn.js
1 parent d0c1caf commit bbe2fa3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
exports.Client = Client
44
exports.Server = Server
55

6-
var bn = require('bn.js')
6+
var BN = require('bn.js')
77
var bncode = require('bncode')
88
var compact2string = require('compact2string')
99
var dgram = require('dgram')
@@ -702,7 +702,7 @@ function toUInt32 (n) {
702702

703703
function toUInt64 (n) {
704704
if (n > MAX_UINT || typeof n === 'string') {
705-
var bytes = bn(n).toArray()
705+
var bytes = new BN(n).toArray()
706706
while (bytes.length < 8) {
707707
bytes.unshift(0)
708708
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"querystring": "^0.2.0",
2020
"run-parallel": "^1.0.0",
2121
"string2compact": "^1.1.0",
22-
"bn.js": "^0.3.1"
22+
"bn.js": "^0.4.3"
2323
},
2424
"devDependencies": {
2525
"parse-torrent": "^1.1.0",

0 commit comments

Comments
 (0)