minor: remove commented code. style concerns.
This commit is contained in:
parent
c6bafbcb48
commit
6072fe7afd
@ -93,18 +93,11 @@ TXPool.prototype.add = function add(tx, noWrite) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only add orphans if the tx has outputs that are ours.
|
// Only add orphans if this input is
|
||||||
// if (!ownOutput)
|
// ours or the tx has outputs that are ours.
|
||||||
// continue;
|
|
||||||
|
|
||||||
// Only add orphans if this input is ours or the tx has outputs that are ours.
|
|
||||||
if (!ownOutput && (!ownInput || !~ownInput.indexOf(input)))
|
if (!ownOutput && (!ownInput || !~ownInput.indexOf(input)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Only add orphans if this input is ours.
|
|
||||||
// if (!ownInput || !~ownInput.indexOf(input))
|
|
||||||
// continue;
|
|
||||||
|
|
||||||
// Add orphan, if no parent transaction is yet known
|
// Add orphan, if no parent transaction is yet known
|
||||||
var orphan = { tx: tx, index: input.out.index };
|
var orphan = { tx: tx, index: input.out.index };
|
||||||
if (this._orphans[key])
|
if (this._orphans[key])
|
||||||
@ -141,9 +134,8 @@ TXPool.prototype.add = function add(tx, noWrite) {
|
|||||||
var out = tx.outputs[i];
|
var out = tx.outputs[i];
|
||||||
|
|
||||||
// Do not add unspents for outputs that aren't ours.
|
// Do not add unspents for outputs that aren't ours.
|
||||||
if (!~ownOutput.indexOf(out)) {
|
if (!~ownOutput.indexOf(out))
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
var key = hash + '/' + i;
|
var key = hash + '/' + i;
|
||||||
var orphans = this._orphans[key];
|
var orphans = this._orphans[key];
|
||||||
|
|||||||
@ -193,9 +193,8 @@ Wallet.prototype.ownInput = function ownInput(tx, index) {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (bcoin.script.isPubkeyhashInput(input.script) &&
|
if (bcoin.script.isPubkeyhashInput(input.script) &&
|
||||||
utils.isEqual(input.script[1], key)) {
|
utils.isEqual(input.script[1], key))
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
if (!input.out.tx)
|
if (!input.out.tx)
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user