fix: allow ownOutputs as orphans - fixes failing test. see #27.

This commit is contained in:
Christopher Jeffrey 2014-06-16 22:46:52 -05:00
parent 1e6de0e5e1
commit 6a03b30ddf

View File

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