add getUsedUnspent to txproposals

This commit is contained in:
Matias Alejo Garcia 2014-04-21 12:00:14 -03:00
commit 0523d99eda
4 changed files with 38 additions and 5 deletions

View file

@ -181,6 +181,16 @@ TxProposals.prototype.setSent = function(ntxid,txid) {
this.txps[ntxid].setSent(txid);
};
TxProposals.prototype.getUsedUnspent = function() {
var ret = [];
for(var i in this.txps) {
var u = this.txps[i].builder.getSelectedUnspent();
for (var j in u){
ret.push(u[j].txid);
}
}
return ret;
};
TxProposals.prototype.merge = function(t) {
if (this.network.name !== t.network.name)