From 6a03b30ddf9d5ef293a1022c27967edae4d57f44 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Mon, 16 Jun 2014 22:46:52 -0500 Subject: [PATCH] fix: allow ownOutputs as orphans - fixes failing test. see #27. --- lib/bcoin/tx-pool.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/bcoin/tx-pool.js b/lib/bcoin/tx-pool.js index 5adddb1e..7b6926aa 100644 --- a/lib/bcoin/tx-pool.js +++ b/lib/bcoin/tx-pool.js @@ -98,12 +98,12 @@ TXPool.prototype.add = function add(tx, noWrite) { // continue; // Only add orphans if this input is ours or the tx has outputs that are ours. - // if (!ownOutput && (!ownInput || !~ownInput.indexOf(input))) - // continue; + if (!ownOutput && (!ownInput || !~ownInput.indexOf(input))) + continue; // Only add orphans if this input is ours. - if (!ownInput || !~ownInput.indexOf(input)) - continue; + // if (!ownInput || !~ownInput.indexOf(input)) + // continue; // Add orphan, if no parent transaction is yet known var orphan = { tx: tx, index: input.out.index };