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