lint.
This commit is contained in:
parent
5cb23020ff
commit
0d0b6c562e
@ -423,7 +423,7 @@ VERSION_ERROR = 'Warning:'
|
|||||||
+ ' format has changed drastically. If you want to dump your'
|
+ ' format has changed drastically. If you want to dump your'
|
||||||
+ ' data, downgrade to your previous version first. If you do'
|
+ ' data, downgrade to your previous version first. If you do'
|
||||||
+ ' not think you should be seeing this error, post an issue on'
|
+ ' not think you should be seeing this error, post an issue on'
|
||||||
+ ' the repo.'
|
+ ' the repo.';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Expose
|
* Expose
|
||||||
|
|||||||
@ -652,7 +652,6 @@ Mempool.prototype.has = function has(hash, callback) {
|
|||||||
|
|
||||||
Mempool.prototype.addTX = function addTX(tx, callback, force) {
|
Mempool.prototype.addTX = function addTX(tx, callback, force) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var flags = constants.flags.STANDARD_VERIFY_FLAGS;
|
|
||||||
var lockFlags = constants.flags.STANDARD_LOCKTIME_FLAGS;
|
var lockFlags = constants.flags.STANDARD_LOCKTIME_FLAGS;
|
||||||
var hash = tx.hash('hex');
|
var hash = tx.hash('hex');
|
||||||
var ret = {};
|
var ret = {};
|
||||||
|
|||||||
@ -663,9 +663,6 @@ RBT.prototype.put = function put(key, value, options, callback) {
|
|||||||
options = null;
|
options = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!options)
|
|
||||||
options = {};
|
|
||||||
|
|
||||||
this.insert(key, value);
|
this.insert(key, value);
|
||||||
|
|
||||||
return utils.nextTick(callback);
|
return utils.nextTick(callback);
|
||||||
@ -684,9 +681,6 @@ RBT.prototype.del = function del(key, options, callback) {
|
|||||||
options = null;
|
options = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!options)
|
|
||||||
options = {};
|
|
||||||
|
|
||||||
this.remove(key);
|
this.remove(key);
|
||||||
|
|
||||||
return utils.nextTick(callback);
|
return utils.nextTick(callback);
|
||||||
|
|||||||
@ -43,7 +43,7 @@ function SigCache(size) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
SigCache.prototype.add = function add(hash, sig, key) {
|
SigCache.prototype.add = function add(hash, sig, key) {
|
||||||
var index, key;
|
var i, k;
|
||||||
|
|
||||||
if (this.size === 0)
|
if (this.size === 0)
|
||||||
return;
|
return;
|
||||||
@ -51,10 +51,10 @@ SigCache.prototype.add = function add(hash, sig, key) {
|
|||||||
this.valid[hash] = new SigCacheEntry(sig, key);
|
this.valid[hash] = new SigCacheEntry(sig, key);
|
||||||
|
|
||||||
if (this.keys.length === this.size) {
|
if (this.keys.length === this.size) {
|
||||||
index = Math.floor(Math.random() * this.keys.length);
|
i = Math.floor(Math.random() * this.keys.length);
|
||||||
key = this.keys[index];
|
k = this.keys[i];
|
||||||
delete this.valid[key];
|
delete this.valid[k];
|
||||||
this.keys[index] = hash;
|
this.keys[i] = hash;
|
||||||
} else {
|
} else {
|
||||||
this.keys.push(hash);
|
this.keys.push(hash);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user