This commit is contained in:
Christopher Jeffrey 2016-07-02 17:36:39 -07:00
parent 5cb23020ff
commit 0d0b6c562e
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
4 changed files with 6 additions and 13 deletions

View File

@ -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

View File

@ -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 = {};

View File

@ -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);

View File

@ -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);
}