fix test.

This commit is contained in:
Christopher Jeffrey 2016-02-15 15:41:35 -08:00
parent 7a32e510e9
commit 23d3343994
2 changed files with 6 additions and 4 deletions

View File

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

View File

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