From 23d3343994e20aced08ae0c09a9d4d906ee590a5 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Mon, 15 Feb 2016 15:41:35 -0800 Subject: [PATCH] fix test. --- lib/bcoin/tx-pool.js | 6 ++---- test/wallet-test.js | 4 ++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/bcoin/tx-pool.js b/lib/bcoin/tx-pool.js index 990142bc..9470cf08 100644 --- a/lib/bcoin/tx-pool.js +++ b/lib/bcoin/tx-pool.js @@ -140,10 +140,8 @@ TXPool.prototype.add = function add(tx, noWrite, strict) { } // Only add orphans if this input is ours. - if (input.output) { - if (!this._wallet.ownInput(input)) - continue; - } + if (!this._wallet.ownInput(input)) + continue; // Add orphan, if no parent transaction is yet known orphan = { tx: tx, index: i }; diff --git a/test/wallet-test.js b/test/wallet-test.js index 0a397d15..8087d7fd 100644 --- a/test/wallet-test.js +++ b/test/wallet-test.js @@ -111,6 +111,10 @@ describe('Wallet', function() { w.sign(f1); var fake = bcoin.tx().input(t1, 1) // 1000 (already redeemed) .out(w, 500); + // Script inputs but do not sign + w.scriptInputs(fake); + // Fake signature + fake.inputs[0].script[0] = [0,0,0,0,0,0,0,0,0]; // balance: 11000 // Just for debugging