torrent-properties
Advanced tools
Comparing version 1.1.0 to 1.1.1
21
index.js
@@ -121,5 +121,5 @@ const sodium = require('sodium-universal') | ||
propertyData = this.getProperty(address, true) | ||
// if(propertyData){ | ||
// return callback(new Error('address key is already managed')) | ||
// } | ||
if(propertyData){ | ||
return callback(new Error('address key is already managed')) | ||
} | ||
} | ||
@@ -136,8 +136,3 @@ | ||
if(manage){ | ||
if(propertyData){ | ||
propertyData.infoHash = infoHash | ||
propertyData.sequence = sequence | ||
} else { | ||
this.check.push({ address, infoHash, sequence, own: false }) | ||
} | ||
this.check.push({ address, infoHash, sequence, own: false }) | ||
} | ||
@@ -147,7 +142,3 @@ | ||
} else if(!res){ | ||
if(manage && propertyData){ | ||
return callback(null, propertyData) | ||
} else { | ||
return callback(new Error('Could not resolve address')) | ||
} | ||
return callback(new Error('Could not resolve address')) | ||
} | ||
@@ -181,3 +172,3 @@ }) | ||
const buffSecKey = Buffer.from(keypair.secret, 'hex') | ||
const sequence = propertyData ? propertyData.sequence + 1 : 1 | ||
const sequence = propertyData ? propertyData.sequence + 1 : 0 | ||
@@ -184,0 +175,0 @@ this.dht.put({k: buffAddKey, v: {ih: Buffer.from(infoHash, 'hex')}, sign: (buf) => {return sign(buf, buffAddKey, buffSecKey)}, seq: sequence}, (putErr, hash) => { |
{ | ||
"name": "torrent-properties", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "BEP 46", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8813
223