Merge pull request #188 from matiu/feature/peer-checking

Feature/peer checking
This commit is contained in:
Mario Colque 2014-04-25 10:27:06 -03:00
commit 6cb1b5a851
13 changed files with 206 additions and 145 deletions

View file

@ -92,17 +92,25 @@ PublicKeyRing.prototype.getCopayerId = function(i) {
return this.copayerIds[i];
};
PublicKeyRing.prototype.myCopayerId = function(i) {
return this.getCopayerId(0);
};
PublicKeyRing.prototype.registeredCopayers = function () {
return this.copayersBIP32.length;
};
PublicKeyRing.prototype.isComplete = function () {
return this.registeredCopayers() >= this.totalCopayers;
return this.registeredCopayers() === this.totalCopayers;
};
PublicKeyRing.prototype.getAllCopayerIds = function() {
var ret = [];
var l = this.registeredCopayers();
for(var i=0; i<l; i++) {
ret.push(this.getCopayerId(i));
}
return ret;
};
PublicKeyRing.prototype.myCopayerId = function(i) {
return this.getCopayerId(0);
};
PublicKeyRing.prototype._checkKeys = function() {