From 6072fe7afd3cdb7d04680023ddfb2f650d44f717 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Tue, 24 Jun 2014 00:45:18 -0500 Subject: [PATCH] minor: remove commented code. style concerns. --- lib/bcoin/tx-pool.js | 14 +++----------- lib/bcoin/wallet.js | 3 +-- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/lib/bcoin/tx-pool.js b/lib/bcoin/tx-pool.js index 7b6926aa..57cad41b 100644 --- a/lib/bcoin/tx-pool.js +++ b/lib/bcoin/tx-pool.js @@ -93,18 +93,11 @@ TXPool.prototype.add = function add(tx, noWrite) { continue; } - // Only add orphans if the tx has outputs that are ours. - // if (!ownOutput) - // continue; - - // Only add orphans if this input is ours or the tx has outputs that are ours. + // Only add orphans if this input is + // ours or the tx has outputs that are ours. if (!ownOutput && (!ownInput || !~ownInput.indexOf(input))) continue; - // Only add orphans if this input is ours. - // if (!ownInput || !~ownInput.indexOf(input)) - // continue; - // Add orphan, if no parent transaction is yet known var orphan = { tx: tx, index: input.out.index }; if (this._orphans[key]) @@ -141,9 +134,8 @@ TXPool.prototype.add = function add(tx, noWrite) { var out = tx.outputs[i]; // Do not add unspents for outputs that aren't ours. - if (!~ownOutput.indexOf(out)) { + if (!~ownOutput.indexOf(out)) continue; - } var key = hash + '/' + i; var orphans = this._orphans[key]; diff --git a/lib/bcoin/wallet.js b/lib/bcoin/wallet.js index ec333b97..877f7a44 100644 --- a/lib/bcoin/wallet.js +++ b/lib/bcoin/wallet.js @@ -193,9 +193,8 @@ Wallet.prototype.ownInput = function ownInput(tx, index) { return false; if (bcoin.script.isPubkeyhashInput(input.script) && - utils.isEqual(input.script[1], key)) { + utils.isEqual(input.script[1], key)) return true; - } if (!input.out.tx) return false;