Only remove pending txps

This commit is contained in:
Ivan Socolsky 2014-09-04 17:37:38 -03:00
commit ace301d1f8
2 changed files with 37 additions and 4 deletions

View file

@ -1529,7 +1529,16 @@ Wallet.prototype.removeTxWithSpentInputs = function(cb) {
var self = this;
cb = cb || function () {};
var txps = this.getTxProposals();
var txps = [];
var maxRejectCount = this.maxRejectCount();
for (var ntxid in this.txProposals.txps) {
var txp = this.txProposals.txps[ntxid];
txp.ntxid = ntxid;
if (txp.isPending(maxRejectCount)) {
txps.push(txp);
}
}
var inputs = [];
txps.forEach(function (txp) {