add purge to tx prosposals

This commit is contained in:
Matias Alejo Garcia 2014-08-21 13:12:55 -04:00
commit 4931c9d618
6 changed files with 114 additions and 6 deletions

View file

@ -65,6 +65,17 @@ TxProposal.prototype._check = function() {
}
};
TxProposal.prototype.rejectCount = function() {
return Object.keys(this.rejectedBy);
};
TxProposal.prototype.isPending = function(maxRejectCount) {
if (this.rejectCount() < maxRejectCount || p.sentTxid)
return false;
return true;
};
TxProposal.prototype._updateSignedBy = function() {
this._inputSignatures = [];