From 46d7fba13a4e53160c13b67d9bfae3e592235ed0 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Fri, 1 Jul 2016 03:13:50 -0700 Subject: [PATCH] fix peer. --- lib/bcoin/input.js | 5 +---- lib/bcoin/output.js | 3 --- lib/bcoin/peer.js | 8 ++++---- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/lib/bcoin/input.js b/lib/bcoin/input.js index 7bd45903..92697729 100644 --- a/lib/bcoin/input.js +++ b/lib/bcoin/input.js @@ -189,9 +189,6 @@ Outpoint.prototype.inspect = function inspect() { * @property {Number} sequence - nSequence. * @property {Witness} witness - Witness (empty if not present). * @property {Coin?} coin - Previous output. - * @property {String} type - Script type. - * @property {String?} address - Input address. - * @property {Boolean} mutable */ function Input(options) { @@ -241,7 +238,7 @@ Input.prototype.fromOptions = function fromOptions(options) { /** * Instantiate an Input from options object. - * @param {NakedInput} options - The jsonified input object. + * @param {NakedInput} options * @returns {Input} */ diff --git a/lib/bcoin/output.js b/lib/bcoin/output.js index 0171e683..9b1fbaea 100644 --- a/lib/bcoin/output.js +++ b/lib/bcoin/output.js @@ -19,9 +19,6 @@ var assert = utils.assert; * @param {NakedOutput} options * @property {Amount} value - Value in satoshis. * @property {Script} script - * @property {String} type - Script type. - * @property {String?} address - Input address. - * @property {Boolean} mutable */ function Output(options) { diff --git a/lib/bcoin/peer.js b/lib/bcoin/peer.js index 373f8f74..389bcd93 100644 --- a/lib/bcoin/peer.js +++ b/lib/bcoin/peer.js @@ -546,7 +546,7 @@ Peer.prototype.setFeeRate = function setFeeRate(rate) { */ Peer.prototype.destroy = function destroy() { - var i, j, hashes, hash, queue; + var i, j, keys, cmd, queue; if (this.destroyed) return; @@ -561,10 +561,10 @@ Peer.prototype.destroy = function destroy() { this.ping.timer = null; } - hashes = Object.keys(this.requests.map); + keys = Object.keys(this.requests.map); - for (i = 0; i < hashes.length; i++) { - hash = hashes[i]; + for (i = 0; i < keys.length; i++) { + cmd = keys[i]; queue = this.requests.map[cmd]; for (j = 0; j < queue.length; j++)