Add method removeTxWithSpentInputs to wallet

This commit is contained in:
Ivan Socolsky 2014-08-27 16:42:07 -03:00
commit 8b55f69d40
2 changed files with 43 additions and 0 deletions

View file

@ -44,6 +44,13 @@ TxProposals.prototype.getNtxids = function() {
return Object.keys(this.txps);
};
TxProposals.prototype.deleteOne = function(ntxid) {
var txp = this.txps[ntxid];
if (!txp)
throw new Error('Unknown TXP: ' + ntxid);
delete this.txps[ntxid];
};
TxProposals.prototype.deleteAll = function() {
this.txps = {};
};